You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by df...@apache.org on 2008/08/28 17:33:19 UTC
svn commit: r689852 -
/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java
Author: dfabulich
Date: Thu Aug 28 08:33:18 2008
New Revision: 689852
URL: http://svn.apache.org/viewvc?rev=689852&view=rev
Log:
Add an option to resolve non-transitively
Modified:
maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java
Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java?rev=689852&r1=689851&r2=689852&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/GetMojo.java Thu Aug 28 08:33:18 2008
@@ -135,6 +135,12 @@
*/
private List pomRemoteRepositories;
+ /**
+ * Download transitively, retrieving the specified artifact and all of its dependencies.
+ * @parameter expression="{$transitive}" default-value=true
+ */
+ private boolean transitive = true;
+
public void execute()
throws MojoExecutionException, MojoFailureException
{
@@ -181,8 +187,16 @@
try
{
- artifactResolver.resolveTransitively( Collections.singleton( toDownload ), dummyOriginatingArtifact,
- repoList, localRepository, source );
+ if ( transitive )
+ {
+ artifactResolver.resolveTransitively( Collections.singleton( toDownload ), dummyOriginatingArtifact,
+ repoList, localRepository, source );
+ }
+ else
+ {
+ artifactResolver.resolve ( toDownload, repoList, localRepository );
+ }
+
}
catch ( AbstractArtifactResolutionException e )
{