Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.2.0
-
None
-
None
Description
When specifying an outputDirectory for the Maven Resources plugin, as shown below we are seeing some weird behavior in the plug-in.
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <outputDirectory>${project.build.outputDirectory}</outputDirectory> </configuration> </plugin>
When running a build with mvn clean install, we notice that our test resources from src/test/resources end up in the final WAR file that is created. It seems strange to us that test resource files would end up in a WAR file that will later on be deployed to production.
Commenting out the outputDirectory in the above example, resolves the issue and the test resources end up in the correct place again.
Why does setting outputDirectory to the same its default value explicitly cause this behavior? (see https://maven.apache.org/plugins/maven-resources-plugin/resources-mojo.html) Is this a bug?