I'm going to stick with my Ant build.xml explode target that hooks into maven via <macrodef>. I was trying to avoid using Ant with Maven but it's taking too long to get the exploded WAR+EAR working with Maven and JBoss...
<target name="unzip"> <echo message="**************Beginning unzip target..."/> <echo message="Base directory is ${basedir}" /> <mkdir dir="${basedir}\target\${ear.app.name}\temp"/> <unzip src="${basedir}\target\${ear.app.name}\${war.app.name}.war" dest="${basedir}\target\${ear.app.name}\temp"/> <delete file="${basedir}\target\${ear.app.name}\${war.app.name}.war"/> <mkdir dir="${basedir}\target\${ear.app.name}\${war.app.name}.war"/> <copy todir="${basedir}\target\${ear.app.name}\${war.app.name}.war"> <fileset dir="${basedir}\target\${ear.app.name}\temp" /> </copy> <delete dir="${basedir}\target\${ear.app.name}\temp"/> </target> <target name="install"> <echo message="**************Beginning install target..."/> <maven target="install" basedir="${basedir}"> <arg line="-f ${pom.file} -npu -Dmaven.test.skip=true" /> </maven> </target> <target name="clean"> <echo message="**************Beginning clean target..."/> <echo message="Deleting ${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\temp directory"/> <delete dir="${basedir}\com.echo.cis.gui.ear\target\${ear.app.name}\temp"/> <maven target="clean" basedir="${basedir}"> <arg line="-f ${pom.file}" /> </maven> </target> <!-- <target name="explode" depends="showproperties, clean, install, unzip" description="Runs mvn clean install and then unzips the EAR/WAR and copies to JBoss deploy directory"> --> <target name="explode" depends="showproperties, clean, install, unzip"> <echo message="**************Beginning explode target..."/> <mkdir dir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear" /> <copy todir="${jboss.home}/server/${jboss.profile}/deploy/${ear.app.name}.ear"> <fileset dir="${artifact.dir}" /> </copy> <tstamp> <format property="now" pattern="MM/dd/yyyy hh:mm:ss" locale="en,US"/> </tstamp> <echo message="Current datetime: ${now}"/> <echo message="The app can be accessed at ${final.url}" /> </target> -- View this message in context: http://maven.40175.n5.nabble.com/Creating-a-Custom-Lifecycle-tp1044781p1045597.html Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org