Pete,

I tried both the war overlaying as well as the suggestion by Martin to pull
shared resources from a directory. As noted, the <targetPath> directive
doesn't work in version 2.0.1. I pulled down the latest code and built a
local version. I did notice a potential bug.  The code in the latest HEAD
branch handles copying of the resources but when you turn the <filtering>
on, it fails to copy resources with a ClassCastException.

FYI, my project layout is as follows:

parent_project/src/WEB-INF (shared resources)
parent_project/module1/...
parent_project/modeul2/...

The configuration for maven-war-plugin in parent's pom.xml:
    <configuration>
      <webResources>
         <resource>
           <directory>${project.basedir}/../src/WEB-INF</directory>
           <!-- override the destination directory for this resource -->   
           <targetPath>WEB-INF</targetPath> 
           <!-- enable filtering -->
           <filtering>false</filtering>
         </resource>        
      </webResources>
    </configuration>  

There is no further configuration of maven-war-plugin in any of child poms.


Note: the filters are provided as properties in profiles.xml at the parent
project level.
-- 
View this message in context: 
http://www.nabble.com/m2-multiple-war-files-with-some-common-code-tf1939224.html#a5424066
Sent from the Maven - Users forum at Nabble.com.


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

Reply via email to