Monday, April 1, 2013

Deploying WARs With a Script

I've wanted to figure this out for a long time and yesterday I finally put together a script that updates a WAR to WebSphere. I have WebSphere Portal running locally on my development box and running the following command will use wsadmin to update a freshly built WAR to the server:

sudo /opt/IBM/WPS8/WebSphere/wp_profile/bin/ -conntype SOAP -user wpsadmin -password wpsadmin -c "\$AdminApp update POC_WS_war app {-operation update -contents /home/dsixe/WEF/POC_WS.war}"

It took me a while to find out why my script wasn't working, the $AdminApp command requires a \ prefix on non-windows platforms. I initially thought that somebody else would have published a clear example of how to deploy with a script, but I just couldn't find one with repeated google searches (at least none that had the \ prefix).
Please note that generic comments containing links with the intent of self promotion will be flagged as spam and deleted.


Post a Comment

Are you about to post a generic comment that has nothing to do with this post? Something like "Hey thanks for this very valuable information, BTW here's my website". If so, it will be marked as spam and deleted within 24 hours.

Note: Only a member of this blog may post a comment.