[
https://jira.codehaus.org/browse/MRESOURCES-87?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael Osipov closed MRESOURCES-87.
------------------------------------
Resolution: Won't Fix
Please refer to
https://cwiki.apache.org/confluence/display/MAVEN/The+Great+JIRA+Cleanup+of+2014
if you're wondering why this issue was closed out.
> Test resource doesn't override main resource
> --------------------------------------------
>
> Key: MRESOURCES-87
> URL: https://jira.codehaus.org/browse/MRESOURCES-87
> Project: Maven Resources Plugin
> Issue Type: Bug
> Components: copy
> 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 was sent by Atlassian JIRA
(v6.1.6#6162)