maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r1069935 - /maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
Date Fri, 11 Feb 2011 20:04:37 GMT
Author: bentmann
Date: Fri Feb 11 20:04:37 2011
New Revision: 1069935

URL: http://svn.apache.org/viewvc?rev=1069935&view=rev
Log:
o Allowed event spy to monitor project dependency graph

Modified:
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java?rev=1069935&r1=1069934&r2=1069935&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/internal/LifecycleDependencyResolver.java
Fri Feb 11 20:04:37 2011
@@ -19,6 +19,7 @@ import org.apache.maven.RepositoryUtils;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.eventspy.internal.EventSpyDispatcher;
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.lifecycle.LifecycleExecutionException;
 import org.apache.maven.project.DefaultDependencyResolutionRequest;
@@ -61,6 +62,9 @@ public class LifecycleDependencyResolver
     @Requirement
     private ArtifactFactory artifactFactory;
 
+    @Requirement
+    private EventSpyDispatcher eventSpyDispatcher;
+
     @SuppressWarnings({"UnusedDeclaration"})
     public LifecycleDependencyResolver()
     {
@@ -162,6 +166,8 @@ public class LifecycleDependencyResolver
                 new DefaultDependencyResolutionRequest( project, session.getRepositorySession()
);
             request.setResolutionFilter( resolutionFilter );
 
+            eventSpyDispatcher.onEvent( request );
+
             result = dependenciesResolver.resolve( request );
         }
         catch ( DependencyResolutionException e )
@@ -191,6 +197,8 @@ public class LifecycleDependencyResolver
             }
         }
 
+        eventSpyDispatcher.onEvent( result );
+
         Set<Artifact> artifacts = new LinkedHashSet<Artifact>();
         if ( result.getDependencyGraph() != null && !result.getDependencyGraph().getChildren().isEmpty()
)
         {



Mime
View raw message