You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2012/10/23 11:33:36 UTC

[jira] (MRRESOURCES-61) processed resources are added to main and test resources

    [ https://jira.codehaus.org/browse/MRRESOURCES-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=312023#comment-312023 ] 

Dennis Lundberg commented on MRRESOURCES-61:
--------------------------------------------

I had a look at this and I think that we need a more advanced solution. Here's another use case that shows why.

We have a resource bundle that consists of ddl and sql files that are used to set up a small database for unit testing. We really don't want these files to be in the main resources directory - only the test resources directory. In version 1.3 of the plugin they end up in both, as described in the title of this issue. This use case is sort of the reverse of the one described by David.

I propose that we add a configuration parameter that let you say in which resource directories the bundle should be unpacked, like this:

{code:xml}
<configuration>
  <!-- Comma separated list of values.
       Allowed values: "main" and/or "test"
       Default value: "main,test" -->
  <resourceOutputDirectories>main</resourceOutputDirectories>
</configuration>
{code}

                
> processed resources are added to main and test resources
> --------------------------------------------------------
>
>                 Key: MRRESOURCES-61
>                 URL: https://jira.codehaus.org/browse/MRRESOURCES-61
>             Project: Maven 2.x Remote Resources Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: Windows 7
>            Reporter: David Tombs
>            Priority: Minor
>         Attachments: mrreserouces-61-project.zip
>
>
> When <attached> is set to true, Maven Remote Resources Plugin adds processed resources to both the main and test resources directories. I see no reason to add the resources to the test directory unless explicitly specified because the test classpath by default includes the main resources as well. The disadvantage to including the resources in both the main and test directories is that you end up with duplicate files on the class path which, for example, can make logback complain about multiple "logback.xml" files.
> The code in question is on lines 533-534 of ProcessRemoteResourcesMojo.java. If you need an example project I can make one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira