This is exactly what we do here.

To do so, we run maven war goals (multiproject here...) and then copy the generated war file(s) through the dist:prepare-bin-filesystem postgoal such as:
               <!-- copying war files in distrib -->
<maven:reactor basedir="${basedir}" excludes="*/project.xml" includes="smartdocument.services/*/project.xml" postProcessing="true" collectOnly="true" collectionVar="multiprjs" ignoreFailures="false" />
               <j:forEach var="project" items="${multiprjs}">
<echo>Copying ${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war to ${maven.dist.bin.assembly.dir}</echo> <copy file='${project.getContext().getVariable("maven.build.dir")}/${project.getArtifactId()}.war' tofile="${maven.dist.bin.assembly.dir}/${project.getArtifactId()}.war" />
               </j:forEach>

and also don't forget to delete the generated jar file:
   <delete file="${maven.dist.bin.assembly.dir}/${maven.final.name}.jar" />

As for the docs, same mechanism and still in this postgoal.

HTH,

--mike

Xavier de Labouret wrote:


Hello maven-users,

I would like to use Maven (1.02) for a production environment involving mostly Tomcat servers.

My intention was to use the distribution plugin to upload an archive with both the docs and the .war file for a webapp. However the "maven dist" target packs an archive with a jar file, and i could not find a property that would let me build the archive with a war file instead of a jar file.

Using maven war:dist is not a good solution for me, because i need to provide the docs with the webapp.

Is there a simple way (maven.xml, ...) to build a tar.gz file with a .war and the docs? Or should i write my own plugin?

Best thanks

Xavier de Labouret

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to