Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
2.4.2, 2.5
-
None
-
None
-
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"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"
Description
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"
<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>
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