You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mauro Talevi <ma...@aquilonia.org> on 2003/04/01 11:21:32 UTC

Re: war:war

Ben Walding wrote:
> I've committed a patch along these lines.
> 
> <exclude name="WEB-INF/classes/**/*.class"/>
> 
> 
> 
> Ultimately I plan to split the war generation into two phases
> 
> Phase 1: Build the structure of the war in target/war
> Phase 2: Compact it all into a war file
> 
> Thus, users will be able to pre and post goal these targets to more 
> finely control the build process.  You would also be able to point your 
> container at this directory for a faster build / compile cycle.
> 

That is possible with 1.0-beta8 provided:

1. you define in your maven.xml the
<preGoal name="war:init">
	// copy here into ${maven.war.src} whatever you need to be in
	// webapp structure apart from classes and lib
	// they may be copied from multiple sources
	// eg if you use struts you may have defined a struts home dir
	// which contains a the tlds while your struts-config.xml is
	// in your cvs
</preGoal>

2. in your project.properties define
maven.war.src=${maven.build.dir}/webapp

This uses maven.war.src as a temp dir to aggregate all sources that you 
need for the war generation and then passes it over to the war plugin 
target.

But I do agree that a more formalised way of generating war:war or 
war:webapp which allows one to define the sources of the war contents
would be very useful.
One possible way would be to add an optional element to the project.xml
eg <warSources> which specifies what goes in WEB-INF and what in the root.

Is that feasable (ie to add an element to the POM)?

Cheers, Mauro



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org