war:exploded with war dependency doesn't copy the src/main/resources to 
WEB-INF/classses
----------------------------------------------------------------------------------------

                 Key: MWAR-223
                 URL: http://jira.codehaus.org/browse/MWAR-223
             Project: Maven 2.x WAR Plugin
          Issue Type: Bug
    Affects Versions: 2.1-beta-1
         Environment: Windows XP Pro SP3
Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing)

            Reporter: Nicolas COSME


The war:exploded goal on a webapp project that depends on another war failed to 
copy the src/main/resources content (or other resources defined in the pom) to 
the WEB-INF/classes target.

Use case :
1- Create a wepapp projet with toto.xml into src/main/resources
2- Launch mvn war:exploded, in ./target/mywebapp/WEB-INF/classes, the file 
'toto.xml' is present.
3- Add a dependency on another war project containing java resources or not, 
and launch the previous goal, the file 'toto.xml' is not present.

Quick fix;
Force the copy using the 'webResource' property in your pom.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-1</version>  
<configuration>
<webResources>
<resource>
<directory>src/main/resources</directory>
<targetPath>WEB-INF/classes</targetPath>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>





-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to