[
https://issues.apache.org/jira/browse/MRESOURCES-280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470137#comment-17470137
]
Michael Osipov commented on MRESOURCES-280:
-------------------------------------------
Truly weird, provide a sample reproducer which depicts the actual issue.
> Test resources are copied into production WAR file
> --------------------------------------------------
>
> Key: MRESOURCES-280
> URL: https://issues.apache.org/jira/browse/MRESOURCES-280
> Project: Maven Resources Plugin
> Issue Type: Bug
> Components: copy
> Affects Versions: 3.2.0
> Reporter: Dries Elliott
> Priority: Major
>
> When specifying an {{outputDirectory}} for the Maven Resources plugin, as
> shown below we are seeing some weird behavior in the plug-in.
> {code:java}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <configuration>
> <outputDirectory>${project.build.outputDirectory}</outputDirectory>
> </configuration>
> </plugin> {code}
> 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?
--
This message was sent by Atlassian Jira
(v8.20.1#820001)