Hi, just knocked together a proof of concept for a generic j2ee deployment style for maven. As this is a proof of concept, I've only completed basic war deployment / undeployment.
What I have done is added a few target to plugins/j2ee/build.xml which delegate
to a specific appserver/build.xml. These targets enable deployment,
undeployment and updating of a war file within tomcat(4.1 dev) and
weblogic(6.x). To switch between servers (tomcat | weblogic) change the
maven.j2ee.server property in j2ee/build.properties
Requirements
Ant 1.5 (for the serverdeploy tasks)
(either or both of the following)
Tomcat 4.1 (for the org.apache.catatlina.ant tasks)
Weblogic 6.x
this is what's in the j2ee.zip
|_ j2ee
|_ build.xml contains a few new targets
|_ default.properties contains one new property
|
|_ tomcat
| |_ build.xml
| |_ default.properties
|
|_ weblogic
| |_ build.xml
| |_ default.properties
unzip j2ee.zip under maven.home/plugins
modify maven.home/plugins/j2ee/tomcat/default.properties for your tomcat props.
modify maven.home/plugins/j2ee/weblogic/default.properties for your weblogic props.
examplewar.zip contains a maven project that when deployed has a servlet
listening on /examplewar/TestServlet
unzip examplewar.zip somewhere and then execute these targets
examplewar>ant maven:war-deploy
examplewar>ant maven:war-update
examplewar>ant maven:war-undeploy
Both tomcat ant weblogic need to be installed locally to access the jars. The
tomcat classes (contained in tomcat-home/server/lib/catalina-ant.jar) facilitate
deployment via http to remote servers, so would work as a jar in librepo. AFAIK
the weblogic classes send the file location of the component to the server which
uploads the file from the filesystem. So weblogic has to be installed on the
same filesystem as the maven deployment :(
Let me know if this is a good idea and I'll do deployment for ejbs, ears etc..
and add a few other app servers.
Cheers
Nathan
j2ee.zip
Description: Zip compressed data
examplewar.zip
Description: Zip compressed data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
