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

Mikko Wuokko commented on MDEP-233:
-----------------------------------

The POM did actually get copied to the right location using the repository 
layout, BUT it did ALSO get copied to the root folder.

The problem was, that when using the repository layout the file there was used 
the internal {{installArtifact( artifact, targetRepository )}} method, but 
without the repository layout it was used {{copyArtifact( artifact, 
isStripVersion(), this.prependGroupId, this.useBaseVersion )}}. The 
installArtifact method did actually copy also the POM file so the 
{{copyPoms()}} call was redundant in that case. Just moving the {{copyPoms( 
getOutputDirectory(), artifacts, this.stripVersion );}} inside the {{if ( 
!useRepositoryLayout )}} solves this.
                
> dependency:copy goal should accept copyPom and useRepositoryLayout properties
> -----------------------------------------------------------------------------
>
>                 Key: MDEP-233
>                 URL: https://jira.codehaus.org/browse/MDEP-233
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Improvement
>          Components: copy
>    Affects Versions: 2.2
>            Reporter: Antonio Manuel Muñiz Martín
>            Priority: Minor
>         Attachments: copyPom_useRepositoryLayout_patch.txt
>
>
> dependency:copy goal should accept copyPom and useRepositoryLayout properties:
> {code}
> <plugin>
>     <groupId>org.apache.maven.plugins</groupId>
>     <artifactId>maven-dependency-plugin</artifactId>
>     <version>2.1</version>
>     <configuration>
>         </artifactItems>
>             <artifactItem>
>                 <groupId>javax.transaction</groupId>
>                 <artifactId>jta</artifactId>
>                 <version>1.0.1B</version>
>                 <outputDirectory>target/lib/jta</outputDirectory>
>             </artifactItem>
>         </artifactItems>
>         <copyPom>true</copyPom>
>         <useRepositoryLayout>true</useRepositoryLayout>
>     </configuration>
> </plugin>
> {code}

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