15

I would like to control a remote deployment of a maven generated EAR over to an existing WAS instance not running on the build server.

Ideally, I would like to do this within Maven so that I can remote deploy in say the integration-test phase then proceed to run some JMeters in the verify phase. I guess this is pretty standard.

I have looked around and am unable to find a sensible way to do this in WAS 8.5.

There are a few posts:

Remote Deployment to WAS 6.1

websphere7am-maven-plugin

Cargo

and others around the web, including IBM. None seem to offer a way to achieve a remote deploy to WAS 8.5

Does anybody have a solution?

EDIT 1: Further confirmation from IBM that no official maven solution exists can be found here:

WAS 8.5 - Using Ant to automate tasks

Community
  • 1
  • 1
theINtoy
  • 3,388
  • 2
  • 37
  • 60

4 Answers4

6

AFAIK there is no Maven plugin for full-fledged WAS 8.5, only for WAS Liberty Profile. But that one does not support deployment to remote server.

Remote deployment can be done using WsAdmin Ant Task & Maven AntRun Plugin

ᄂ ᄀ
  • 5,669
  • 6
  • 43
  • 57
  • From further research it does appear that the Ant route is the only route available today. Further google searches turned up these posts: http://stackoverflow.com/questions/3117785/using-ant-to-deploy-ear-to-remote-websphere-application-server http://stackoverflow.com/questions/3117785/using-ant-to-deploy-ear-to-remote-websphere-application-server I guess my big hope is that either websphere7am-maven-plugin or Cargo manage to work this out. I did read on the IBM website that the ANT scripts are the only way today. C'mon IBM maven has been around for a while now... – theINtoy Oct 28 '13 at 11:09
  • You might want to file a feature request via link http://www.ibm.com/developerworks/rfe/execute?use_case=submitRfe&BRAND_ID=181&PROD_FAM_ID=262&PROD_ID=544&COMP_ID=17&OS_ID=16&PRI_ID=3&PRESELECT_DROPDOWNS=true At least Liberty Profile team is quite responsive. – ᄂ ᄀ Oct 28 '13 at 12:21
  • I have added a link to IBM forum confirming this to the original question – theINtoy Oct 29 '13 at 13:50
4

You will soon be able to automatically deploy to WebSphere remotely using Jenkins. You can create a maven project and have Jenkins automatically deploy to WebSphere with the plugin listed below. If you're interested, follow it since I'll be taking feature requests for a limited time.

https://wiki.jenkins-ci.org/display/JENKINS/WebSphere+Deployer+Plugin

Enjoy!

npn_or_pnp
  • 407
  • 4
  • 10
4
<plugin>
    <groupId>com.orctom.mojo</groupId>
    <artifactId>was-maven-plugin</artifactId>e
    <version>1.0.8</version>
    <executions>
        <execution>
            <id>deploy</id>
            <phase>install</phase>
            <goals>
                <goal>deploy</goal>
            </goals>
            <configuration>
                <wasHome>${env.WAS_HOME}</wasHome>
                <applicationName>${project.build.finalName}</applicationName>
                <host>${local or remote address}</host>
                <server>server01</server>
                <node>node01</node>
                <virtualHost>default_host</virtualHost>
                <verbose>true</verbose>
            </configuration>
        </execution>
    </executions>
</plugin>

From https://github.com/orctom/was-maven-plugin

Updated on 5/29/2014

Developer of this plugin states on github, "1.0.1 and 1.0.2 is not working, please don't use them!", so I've updated this answer to show version 1.0.3.

Updated on 1/27/2015

Updated to '1.0.8'.

Hao
  • 131
  • 4
  • 2
    From the author: `NOTE: WebSphere Application Server installation required on host box! But no need to be configured, nor running.` – Pool Mar 25 '15 at 09:04
  • According to @Pool comment, that's why it is not *remote* deploy. – dikkini Apr 27 '16 at 10:13
3

we're using was6-maven-plugin to perform both local and remote deployments to WAS 7. Internally this plugin uses ant tasks from wsadmin so I guess it would also work with WAS 8.5.

Jurica
  • 61
  • 5
  • Could you please add more information? I inherited old project where was obviously used WAS7+maven(was6-maven-plugin). I am able to use it for local deployement, but not for remote. Thanks – Wooff Dec 16 '15 at 13:04