Hi Sunil,
I must admit to not actually using this plugin after its development - maven has
unfortunately dropped off my radar for now. However, while developing the plugin, I
used it to successfully generate deployment/rmic code, start/stop a server,
install/uninstall an application, and start/stop that application.
In my EJB project, I had the following project.properties:
<properties>
# How to do this better with resources?
maven.ejb.src=src
# Keep WSAD's Manifest out (we want maven to generate it completely)
maven.ejb.manifest=some/invalid/path
# This could/should be moved to ${user.home}/build.properties
maven.was5.home=C:/WebSphere/Appserver
# ejbdeploy properties
maven.was5.ejbdeploy=true
</properties>
This allows me to run "maven ejb" for the project, having the ejb jar created and WAS
ejbdeployed (that means having its deployment code generated, not actually deployed).
The other targets in the plugin do not integrate with other standard maven targets -
you call them yourself somehow - either manually as I did when developing the plugin,
or invoke them from your maven.xml as approriate. Assuming your server is named
"server1" then you can start, or stop the server using "maven was5:startServer" or
"maven was5:stopServer". If your server is not named server1, just set
maven.was5.server to the name of your server.
You can deploy your ear file to your WAS server using was5:installApp from your
project that creates the ear using "maven was5:installApp" - it uses the ear in the
target dir by default. Once installed, you can start the application using "maven
was5:startApp" - the application name used by default is the ear's display name (see
below for a hint on this). You can then test your running application. (This would
all be easier if the cactus plugin supports WAS - alas). You can then stop the
application, or just uninstall it using "maven was5:stopApp" and "maven
was5:uninstallApp" respectively. If you want to interrogate the server to see if it's
up or down, use "maven was5:serverStatus", and if you want to see what apps are
installed, use "maven was5:listApps".
There is no target to communicate with wsadmin - I think it would always be easier to
use the wsanttask for this directly (ie. using maven.xml), rather than via a was5
target, though have not done either. There are other tasks available in the
wsanttasks that are not exposed in the was5 plugin - e.g. jsp precompiling. If there
is interest in these, I'll happily apply a patch :-)
Note - if you are using maven to create your .ear file, you may want to manually
specify the display name because the default display name tends to include a ':' which
WAS doesn't like. To do so, I put this in my ear project.properties:
maven.ear.displayname=MyAppName
Also note: you'll probably find you have to use the IBM JDK to run some of these
targets (especially the ejbdeploy).
Hopefully this will help - it's not quite the sample you were after but it's a start.
Maybe someone who uses the plugin more can offer something more concrete (hence the
cc: to maven-users).
Richard
----- Original Message -----
From: Sunil D Patil
To: [EMAIL PROTECTED]
Sent: Wednesday, April 21, 2004 8:50 PM
Subject: Query about Maven WebSphere plugin
Hi Richard,
Thanks for writing this plugin.
I was wondering if you could share a sample for using this plugin.
Thank You
Sunil