Test resource doesn't override main resource --------------------------------------------
Key: MRESOURCES-87 URL: http://jira.codehaus.org/browse/MRESOURCES-87 Project: Maven 2.x Resources Plugin Issue Type: Bug Affects Versions: 2.3 Environment: Apache Maven 2.1.0 (r755702; 2009-03-18 15:10:27-0400) Java version: 1.6.0_07 Reporter: Andrey Paramonov Priority: Minor I have two files: {{src/main/resources/resource.xml}} {{src/test/resources/resource.xml}} and following block in the pom.xml: {code} <build> <resources> <resource> <directory>src/main/resources</directory> </resource> </resources> </build> <profiles> <profile> <id>test</id> <build> <resources> <resource> <directory>src/test/resources</directory> </resource> </resources> </build> </profile> </profiles> {code} When I run {{mvn clean package}}, I want the file from {{src/main/resources}} to be packaged. When I run {{mvn clean package -P test}}, I want the file from {{src/test/resources}} to be packaged. Unfortunately, that doesn't happen. However, when I add {{filtering}} to profiled resource: {code} <profile> <build> <resources> <resource> <directory>src/test/resources</directory> <filtering>true</filtering> </resource> </resources> </build> </profile> {code} it works. So two questions: * is it a bug that overriding strategy is triggered by filtering tag? * if so, which behavior is correct: always override resource or never? -- 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