Usage of copy-resources changes testResources copying behaviour
---------------------------------------------------------------
Key: MRESOURCES-153
URL: https://jira.codehaus.org/browse/MRESOURCES-153
Project: Maven 2.x Resources Plugin
Issue Type: Bug
Components: copy
Affects Versions: 2.5, 2.4.2, 2.6
Environment: Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: C:\Program Files\apache-maven-3.0.3\bin\..
Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_26\jre
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Reporter: Myron
Attachments: resources-debug.txt
Create a dummy project, add foo.txt to src/test/resources
do a "mvn clean package"
foo.txt appears in target/test-classes/foo.txt and is not in packaged jar (as
supposed)
Add build step to copy some additonal files to classpath/jar and again do a
"mvn clean package"
{quote}
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>process-resources</phase>
</execution>
</executions>
<configuration>
<resources>
<resource>
<directory>src/main/additional</directory>
</resource>
</resources>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
</configuration>
</plugin>
</plugins>
{quote}
now what happens:
the files in "additional" are copied to target/classes (as supposed) but the
foo.txt AS WELL (not supposed)
target/test-classes is now empty and all the test resources are packaged into
jar
So specifying the copy-resource goal results in an reconfiguration of the
test-resources copy operation?!
[DEBUG] copy C:\Users\myron\workspace\test\src\test\resources\foo.txt to
C:\Users\myron\workspace\test\target\classes\foo.txt
complete debug attached
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira