Hi all,

I've got a packaging problem : my webapp requires to be "customized" for the target servers -> change web.xml, add some xml (spring) configuration files, add some target-server-specific classes

All other things in my webapp are commons.

I'd like maven to build the 3 wars (I've got 3 target servers), so I've setup multiproject like this:
- commons classes -> app.jar
- base-webapp (JSP, images, script + default config...) -> base.war
- serverN-webapp (server N specific web.xml + some conf + specific JSP) -> serverN.war

It's easy to make the classes commons using a jar project dependency, but what about JSP or static web files ?

Using maven 1, I've setup a maven.xml script that unwar the base.war into target/artifactId as a pregoal to "war:war-resources". This seems to work fine :

<preGoal name="war:war-resources">
   <j:set var="war.build"
value="${pom.getPluginContext('maven-war-plugin').getVariable('maven.war.webapp.dir')}"/>
   <unwar overwrite="true"
       src="${pom.getDependencyPath('gta:gta-web')}"
       dest="${war.build}"/>
 </preGoal>


Using maven 2, I could use antRun and use the "unwar" task, but I don't know how to configure it to run prior to maven2 equivalent for war:war-resources. Is there any more "maven 2"-way to do such a thing ?

It may be usefull also to have a way to "merge" two webapps, for example to develop a Struts-webapp as sub-projects (quick to deploy and test) and merge struts-modules into a big war.

Nico.

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


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

Reply via email to