You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Detelin Yordanov (JIRA)" <ji...@codehaus.org> on 2008/10/17 11:31:20 UTC

[jira] Commented: (MDEP-182) Add exclude*, parameters to copy mojo (analogous to copy-dependencies mojo)

    [ http://jira.codehaus.org/browse/MDEP-182?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=151113#action_151113 ] 

Detelin Yordanov commented on MDEP-182:
---------------------------------------

I will also find this very helpful, currently I'm having a build that creates Eclipse plugin jars, and I use the dependency plugin to copy third-party deps
to the plugin lib folder (inside the jar), however it's really hard to maintain all the artifact items to copy, I would really appreciate if I could list only the ones the plugin directly depends upon, while the transitive ones are copied automatically.

> 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