[ 
http://jira.codehaus.org/browse/MDEP-182?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brian Fox closed MDEP-182.
--------------------------

    Resolution: Won't Fix

Use the -dependencies goals for transitive resolution. The copy/unpack goals 
are meant exactly to pick up just one file.

> Add exclude*,  parameters to copy mojo (analogous to copy-dependencies mojo)
> ----------------------------------------------------------------------------
>
>                 Key: MDEP-182
>                 URL: http://jira.codehaus.org/browse/MDEP-182
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: New Feature
>          Components: copy
>    Affects Versions: 2.1
>            Reporter: Thorsten Möller
>            Assignee: Brian Fox
>
> Today I came around a use case that I miss in the copy goal/mojo of the 
> dependency plugin. Currently, it is not possible (at least I could not find 
> any documentation) to resolve transitive dependencies when copying an 
> artifact nor to specify whether transitive dependencies should be included or 
> excluded. This should be extended analogous to the copy-dependencies mojo.
> Example: Say we want to copy Retrotranslator including its dependencies. 
> Currently we would have to use the following declarations
> <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-dependency-plugin</artifactId>
>       <executions>
>               <execution>
>                       <id>copy</id>
>                       <phase>package</phase>
>                       <goals>
>                               <goal>copy</goal>
>                       </goals>
>                       <configuration>
>                               <artifactItems>
>                                       <artifactItem>
>                                               
> <groupId>net.sf.retrotranslator</groupId>
>                                               
> <artifactId>retrotranslator-runtime</artifactId>
>                                               
> <version>${retrotranslator-version}</version>
>                                               <type>jar</type>
>                                               
> <outputDirectory>${project.build.directory}</outputDirectory>
>                                       </artifactItem>
>                                       <!-- Transitive dependency of 
> Retrotranslator. Unfortunately, not automatically included. -->
>                                       <artifactItem>
>                                               
> <groupId>backport-util-concurrent</groupId>
>                                               
> <artifactId>backport-util-concurrent</artifactId>
>                                               <version>3.1</version>
>                                               <type>jar</type>
>                                               
> <outputDirectory>${project.build.directory}</outputDirectory>
>                                       </artifactItem>
>                               </artifactItems>
>                       </configuration>
>               </execution>
>       </executions>
> </plugin>
> This has the downside that all dependencies must be explicitly listed and 
> artifact versions must be kept consistent, which is "unwished maintenance 
> work". More convenient would be a declaration as follows
> <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-dependency-plugin</artifactId>
>       <executions>
>               <execution>
>                       <id>copy</id>
>                       <phase>package</phase>
>                       <goals>
>                               <goal>copy</goal>
>                       </goals>
>                       <configuration>
>                               <artifactItems>
>                                       <artifactItem>
>                                               
> <groupId>net.sf.retrotranslator</groupId>
>                                               
> <artifactId>retrotranslator-runtime</artifactId>
>                                               
> <version>${retrotranslator-version}</version>
>                                               <type>jar</type>
>                                               
> <outputDirectory>${project.build.directory}</outputDirectory>
>                                               <!-- Force to include *all* 
> transitive dependencies. They should be copied to the same output directory. 
> -->
>                                               
> <excludeTransitive>false</excludeTransitive>
>                                       </artifactItem>
>                               </artifactItems>
>                       </configuration>
>               </execution>
>       </executions>
> </plugin>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to