Here are some things from the maven.xml we use to build and deploy our
webapp. Mostly food for thought I suppose and I'm open to suggestions on
how to do it better.
This supports our ability to deploy an exploded warfile (at
/tmp/webapps/${maven.war.name}.war) to JBoss/Jetty
<postGoal name="war:webapp">
<copy todir="${maven.build.dir}/${maven.war.name}/WEB-INF/classes">
<fileset dir="${maven.conf.dir}" includes="*.properties"/>
</copy>
<copy todir="${webapp.test.dir}/${maven.war.name}.war">
<fileset dir="${maven.build.dir}/${maven.war.name}"/>
</copy>
</postGoal>
These deploy and undeploy the exploded warfile to JBoss/Jetty via JMX
<goal name="deploy-build"
description="Deploys the exploded war directory in
${webapp.test.dir}">
<attainGoal name="war:webapp"/>
<antcall target="jmx:deploy">
<param name="jmx.deploy.file"
value="${webapp.test.dir}/${maven.war.name}.war"/>
</antcall>
</goal>
<goal name="undeploy-build"
description="Undeploys the exploded war directory in
${webapp.test.dir}">
<antcall target="jmx:undeploy">
<param name="jmx.deploy.file"
value="${webapp.test.dir}/${maven.war.name}.war"/>
</antcall>
</goal>
<!-- Deploys or bounces the file specified by ${jmx.deploy.file} -->
<goal name="jmx:deploy">
<attainGoal name="jmx:undeploy"/>
<get dest="deploy.log"
src="${jmx.deploy.url}/action=deploy?java.lang.String%2Bjava.lang.String=file:${jmx.deploy.file}"/>
</goal>
<!-- Undeploys the file specified by ${jmx.deploy.file} -->
<goal name="jmx:undeploy">
<get dest="deploy.log"
src="${jmx.deploy.url}/action=undeploy?java.lang.String%2Bjava.lang.String=file:${jmx.deploy.file}"/>
</goal>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>