I am using Maven-2.0.9 and trying to change the default output location of
the "test resources" (under src/test/resources). By default, they get copied
to target/tests-classes during mvn clean package. However, i want them to be
copied under my specific target/tests-resources folder. I followed the
maven-resources-plugin documentation and came up with this configuration in
my pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>change-test-resource-outputdir</id>
<!-- here the phase you need -->
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
<configuration>
<outputDirectory>target/test-resources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
This works in a weird way. Based on what i see, the test resources are
copied twice, once to the default location (target/tests-classes) and once
to my specific directory (target/tests-resources). Here's what i see on the
console:
[INFO] [enforcer:enforce {execution: enforce-banned-dependencies}]
[INFO] [resources:resources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] [compiler:compile]
[INFO] Compiling 7 source files to /home/myhome...
[INFO] [resources:testResources]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO] [resources:testResources {execution: change-test-resource-outputdir}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO] [compiler:testCompile]
The resources:testResources seems to be called twice.
Is there any way i can avoid the tests resources from being copied to the
default output location?
--
View this message in context:
http://www.nabble.com/Change-the-default-output-location-of-test-resources-tp22097054p22097054.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]