maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1752327 - in /maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency: PurgeLocalRepositoryMojo.java resolvers/ListRepositoriesMojo.java
Date Tue, 12 Jul 2016 19:00:08 GMT
Author: rfscholte
Date: Tue Jul 12 19:00:08 2016
New Revision: 1752327

URL: http://svn.apache.org/viewvc?rev=1752327&view=rev
Log:
Use new version of DependencyResolver#resolveDependencies and dependencyCollector#collectDependencies

Modified:
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java
    maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListRepositoriesMojo.java

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java?rev=1752327&r1=1752326&r2=1752327&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java
(original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java
Tue Jul 12 19:00:08 2016
@@ -44,7 +44,6 @@ import org.apache.maven.plugins.annotati
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.shared.dependencies.resolve.DependencyResolver;
 import org.apache.maven.shared.dependencies.resolve.DependencyResolverException;
-import org.apache.maven.shared.project.DefaultProjectCoordinate;
 import org.apache.maven.shared.artifact.filter.resolve.AbstractFilter;
 import org.apache.maven.shared.artifact.filter.resolve.AndFilter;
 import org.apache.maven.shared.artifact.filter.resolve.Node;
@@ -488,15 +487,9 @@ public class PurgeLocalRepositoryMojo
     {
         try
         {
-            DefaultProjectCoordinate coordinate = new DefaultProjectCoordinate();
-            coordinate.setGroupId( project.getGroupId() );
-            coordinate.setArtifactId( project.getArtifactId() );
-            coordinate.setVersion( project.getVersion() );
-            coordinate.setPackaging( project.getPackaging() );
-            
             Iterable<ArtifactResult> results =
                 dependencyResolver.resolveDependencies( session.getProjectBuildingRequest(),
-                                                        coordinate, filter );
+                                                        project.getModel(), filter );
 
             Set<Artifact> resolvedArtifacts = new HashSet<Artifact>();
             

Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListRepositoriesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListRepositoriesMojo.java?rev=1752327&r1=1752326&r2=1752327&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListRepositoriesMojo.java
(original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/resolvers/ListRepositoriesMojo.java
Tue Jul 12 19:00:08 2016
@@ -28,7 +28,6 @@ import org.apache.maven.plugins.annotati
 import org.apache.maven.shared.dependencies.collect.CollectorResult;
 import org.apache.maven.shared.dependencies.collect.DependencyCollector;
 import org.apache.maven.shared.dependencies.collect.DependencyCollectorException;
-import org.apache.maven.shared.project.DefaultProjectCoordinate;
 
 /**
  * Goal that resolves all project dependencies and then lists the repositories
@@ -59,15 +58,9 @@ public class ListRepositoriesMojo
     {
         try
         {
-            DefaultProjectCoordinate coordinate = new DefaultProjectCoordinate();
-            coordinate.setGroupId( getProject().getGroupId() );
-            coordinate.setArtifactId( getProject().getArtifactId() );
-            coordinate.setVersion( getProject().getVersion() );
-            coordinate.setPackaging( getProject().getPackaging() );
-            
             CollectorResult collectResult =
                 dependencyCollector.collectDependencies( session.getProjectBuildingRequest(),
-                                                         coordinate );
+                                                         getProject().getModel() );
 
             this.getLog().info( "Repositories Used by this build:" );
             



Mime
View raw message