Activate Maven profile based software package installed on deploy server - maven

I am using Maven 2.2.1 for building and deploying an application.
I am having a requirement like, if the application is to be deployed on the server it should check whether the server into which the application is to be deployed is installed in the system. If the server is not installed then it should skip all the remaining processes and exit the build process.
Can I do this using profiles?

Yes, you can do this by activating the profile by the presence of a file. Since your requirement is that the "application is installed on the system" then you can look for a file known to be used by that server software.
For example, if I wanted to activate a profile if WebSphere MQ is installed on a server, I could activate the profile as follows
<file>
<exists>/opt/mqm/java/lib/com.ibm.mq.jar</exists>
</file>
Note, this only works if the server software is always installed in the same location.
Reference: http://www.sonatype.com/books/mvnref-book/reference/profiles-sect-activation.html

Related

Jenkins Websphere Deployment doesnt retain application configurations

I am using Jenkins version 1.644 and trying to deploy a web application to Websphere 8.5 application server. Jenkins job completed successfully and application is visible through admin console. After the first install, i manually configured Three application configurations namely,
1. Virtual Host
2. Context Root and
3 Modules
after these setup application comes up fine.
Now when i run the Jenkins Job again (option used is Install/Update application), it overrides all the configurations.
Please Let me know how to keep the configurations after each build from Jenkins.
Websphere Plugin Configuration
You can create a build deploy job which will call wsadmin tool and there you can pass parameter in key value pairs
Here is an article which talks about how to build job with parameterized configuration.
http://www.touchdownconsulting.nl/2011/03/building-and-deploying-websphere-applications-with-jenkins-ci/
I have not tried this but looks like it suits your requirement.
Hope this helps!
Current Jenkins Websphere deploy plugin (1.3.4) version does not allow to pass
1. Virtual Host
2. Context Root and
3. Modules
I created a Jython script using AdminApp WAS Utility and updated these parameters
AdminApp.edit("appname", ['-MapWebModToVH', [["appname", "appname.war,WEB-INF/web.xml", "api_host"]]])
AdminApp.edit("appname", ['-CtxRootForWebMod', [["appname", "appname.war,WEB-INF/web.xml", "/appname"]]])
AdminApp.edit("appname",['-MapModulesToServers', [["appname","appname.war,WEB-INF/web.xml","WebSphere:cell=appcell01,node=node12v,server=web2+WebSphere:cell=Cell01,node=node11v,server=web1+WebSphere:cell=Cell01,cluster=api-cluster"]]])
AdminConfig.save()
Used Jenkins Remote SSH Plugin to invoke this script.

wasJmsClient not supported in websphere 8.5 liberty profile

I'm having trouble deploying an EAR project on liberty profile locally integrated in eclipse kepler. It comes back with the following error:
Application 'App-Name' requires feature wasJmsClient,
which is not supported by WebSphere Application Server V8.5 liberty profile.
Reason:
Application 'App-Name' requires feature wasJmsClient,
which is not supported by WebSphere Application Server V8.5 liberty profile.
I've read up on IBM documentation which indicates that you need to add suppport to this feature in your server.xml. I have done this, to no evail.
The Liberty profile comes distributed as two jar files, a runtime jar, and an optional extended jar. If you want to use JMS you need to also install the extended jar. Based on the information in the question this might be missing. You can download both the runtime and extended jar from wasdev.net.
You can check to see if the wasJmsClient and wasJmsServer features is installed by running
:
productInfo featureInfo
command found in the wlp/bin folder.
Its simple. Get wlp-extended jar from this link and install it from command prompt as admin.
https://developer.ibm.com/wasdev/downloads/#asset/addons-8.5.5-wlp-extended
Install it just by running the following command from wlp/bin folder:
java -jar wlp-extended.jar
It just prompts for license and its quite interactive.I think its good to go from there. it will install all the webprofile tools.
To recheck that
you can execute the following command from wlp/bin:
productInfo featureInfo
You can use IBM Install Utility (installUtility) inside serverRoot/bin folder to download the required feature:
C:\your\server\path\bin>installUtility install wasJmsClient-2.0
then add it to the server.xml
<featureManager>
<feature>webProfile-8.0</feature>
<feature>localConnector-1.0</feature>
<feature>wasJmsClient-2.0</feature>
</featureManager>

Install4j 5.x: Maven-Plugin, Build-Agents and Floating License HowTo

utoday I got the task to integrate a floating license server for install4j to our build process. Therefore I read the README.txt and the following two threads:
install4jc-specifying-floating-server and floating-license-setup-on-a-headless-ubuntu-server
Now there are still some questions left. Therefore I will describe our build environment shortly. We are using maven to build our software and installer and startet to test install4j by using the maven-plugin for install4j:
We installed the install4j application as zip file to our maven repository
during maven build we download and extract this file to some target directory
until now we installed the demo-license via maven-plugin to the install4j folder
during the package-maven-phase we using the maven-plugin to build the installer mediums
That works very nice. Now the company decided to buy a license-bundle including a floating license server. But how to include this to our build process? My suggestion would be the following:
install license server to a server reachable over the network
modify the config.xml file at the zipped application of the maven-repository and integrate the floating-license-server address or set maven-plugin-license property something like FLOAT:[server-ip]:11862 at the build configuration?
Is the license-key gotten by ej-technologie only necessary for using the ui? Has anybody some similar build environment and can give me some information how to setup this correctly?
Thanks in advance
set maven-plugin-license property something like FLOAT:[server-ip]:11862 at the build configuration?
That would work for the multi-platform edition. If you have the Windows edition, you have to go with:
modify the config.xml file at the zipped application of the maven-repository and integrate the floating-license-server address
As for:
Is the license-key gotten by ej-technologie only necessary for using the ui?
The license key is entered in the license server. Both IDE and command line compiler contact the license server. Only the IDE actually checks out a license as long as the IDE is open, the command line compiler just verifies the validity of the license.

Websphere application server for developers linux command line install

I tried to install websphere application server for developer v8.5. I've already installed the installation manager. Then I download the image from here: all the three parts of WebSphere Application Server for Developers, Installation Manager Repository. Cause my linux has no GUI, so I unzipped the file and tried to use installation manager to install it.
I used :
./imcl listAvailablePackages -repositories /home/user/tmp/wasdev_installer/repository.config to verify that the package exist.
Then I ran : ./imcl install com.ibm.websphere.DEVELOPERSILAN.v85_8.5.5000.20130514_1044 -repositories /home/user/tmp/wasdev_installer/repository.config -installationDirectory /home/user/Websphere_v85 -accessRights nonAdmin -acceptLicense
But I always got errors like :
ERROR: The silent installation process does not support
installing packages that are contained on multiple media discs.
CRIMC1017E ERROR: Failed to locate zip com.ibm.websphere.batch_136_all.all 8.5.5000.201305110146.
Cannot find the table of contents file for an artifact in the repository. Table of contents files are located under the atoc directory in the repository.
If the repository files were transferred from a different location, verify that the files were not altered during the transfer operation. Copy the repository files to a different location and install from that location.
I re-unzipped the file, but didn't help. Was I doing wrong? Thanks for your help.
Deepending on what programming models you're using, you could always try the WebSphe Liberty Profile artefact install: https://www.ibmdw.net/wasdev/downloads/. It doesn't support every programming model that the full profile does, but it's a super-easy install, and easy to get going with as a development environment.
I resolved this issue by unzipping all files to one directory. The file part1 contains disk1, so the other files should be put under the directory of part1, which means in the same level of disk1 directory.
If you do not want to bother with downloading and decompressing archives containing the Installation Manager repositories, then there is a much easier and simpler process for getting WebSphere Application Server for Developers installed.
Once you have IBM Installation Manager installed, you only need to provide the repository location to where the IBM hosted WebSphere Application Server for Developers repository is located. For instance, to install WAS for Developers version 8.0 or version 8.5, you simply add one of the repository locations to the repository preferences.
V8.0: http://www.ibm.com/software/repositorymanager/V8WASDeveloperILAN
V8.5: http://www.ibm.com/software/repositorymanager/V85WASDeveloperILAN
Instructions for installing WAS for Developers using IBM hosted repositories in available on WASDev.net.
You could even use the IBM hosted repositories in your command line installation or response file installation, as long as you create a secure storage file with you MY IBM ID credentials for authenticating with the IBM servers, as described in the WebSphere Knowledge Center.
Alternatively, you can use the IBM Package Utility (a companion to Installation Manager), to reconstruct the IBM hosted repository on your local machine. The advantage to using PU is that you will be able to create a local repository that also includes the fixpack level of your own choosing rather than having to go get a fixpack from IBM Fix Central and then updating the installation afterwards.
Information on creating local repositories with Packaging Utility is available in the WebSphere Knowledge Center.

Remote Deployment with Mule CE

What is the recommended/available approaches to remote deploying a Mule application to a remote Mule server? I'm using Maven for build btw.
I saw that the appkit can remote deploy to Cloudhub: http://blogs.mulesoft.org/using-continuous-deployment-with-cloudhub/
and theres a rest maven plugin for the management console but I'm using the standalone community edition and can not use either one. I also saw a cargo implementation on Github, but this only handle local deployments
I would write a script that:
scp the application to /tmp
remote mv the application to $MULE/apps
Moving a file being an atomic operation prevents potential issues of uploading directly in the /apps directory and have Mule pick-up a partially uploaded application.
"scp the application to /tmp" reminds me this! ...

Resources