Remote deployment to Websphere 6.1.x using wsadmin

noplay picture noplay · Jan 22, 2010 · Viewed 12.9k times · Source

I am trying to remotely deploy a war file to a websphere application server. I understand this is possible to do using wsadmin, but I am a Websphere newb.

I know I can run wsadmin and connect using SOAP to the remote app server, but that is where I am at.

This seems like it should be a common use case, can anyone help me with?

I suppose the use case follows: 1. Update the application 2. Save all changes 3. Restart the remote application server

I am going to do the deployment using either Hudson WAS Builder or Maven, whichever works.

Thanks for your help

Answer

Tommy picture Tommy · Oct 7, 2010

This question is pretty old, but id like to show how we do this remotly. In this case with Ant

<target name="postbuild">
    <exec executable="C:\MyThinClient\wsadmin.bat" failonerror="true">
        <arg line="-conntype SOAP -host ${deployServer} -port ${deployPort} -user ${deployUser} -password ${deployPassword} -c" />
        <arg value="$AdminApp update ${projectName}EAR app {-operation update -contents {${artifactsDir}/${projectName}-${buildVersion}.ear}}" />
    </exec>
</target>

Given the correct setup of the wsadmin.bat you can run this from any server (without WAS installed) At least on WAS 6.1/7.0 ND this will only restart the application with the new binaries, not the whole server