Hi all,
I'm building an artifact with a mixture of ANT and Maven. The artifact has
the packaging type "war" but I need to have it wrapped also in an EAR file.
Instead of creating a second EAR-Maven-Module I decided to have only one
module with an additional ANT build.xml file. The ANT file should let Maven
build the WAR and after that do the EAR wrapping.
Now my question is:
How can I use the maven-ant-tasks-2.0.7 to package the war, i.e. to say the
equivalent of "mvn package" ?
I tried the <artifact:install ..> task of the maven-ant-tasks-2.0.7 but this
task doesn't process the maven build phases that precede the phase
"install". This means that it does not compile and package my artifact
before it tries to install it to the local repo.
Unfortunately, there is neither a <artifact:compile ..> nor a
<artifact:package ..> task in the maven-ant-tasks-2.0.7.
Here is my preliminary solution: I had to call "mvn clean package" via the
command line i.e. via the <exec> ANT task.
<!-- This doesn't process all build phases before install. So the artifact
doesn't get compiled and packaged :-(
<artifact:install file="${outWar}">
<pom refid="pom.webapp" />
</artifact:install>
-->
<exec executable="cmd">
<arg value="/c"/>
<arg value="mvn"/>
<arg value="clean"/>
<arg value="package"/>
</exec>
Any suggestions for a better solution?
Bye, Stefan
--
View this message in context:
http://www.nabble.com/maven-ant-tasks-2.0.7%3A-Hot-to-package-an-artifact--tf4527753s177.html#a12919154
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]