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

Myron commented on MRESOURCES-153:
----------------------------------

ok, i think i found my "problem"
When the configuration is on plugin level, then this behaviour occurs.
Since i wanted to have an extra execution, i do the additional configuration 
within the execution tag.
This seems to work; not overriding the plugin config.
                
> Usage of copy-resources changes testResources copying behaviour
> ---------------------------------------------------------------
>
>                 Key: MRESOURCES-153
>                 URL: https://jira.codehaus.org/browse/MRESOURCES-153
>             Project: Maven 2.x Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 2.4.2, 2.5
>         Environment: 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"
>            Reporter: Myron
>         Attachments: resources-debug.txt
>
>
> 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"
> {code:xml}
>     <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>
> {code}
> 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

--
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

        

Reply via email to