laeubi commented on a change in pull request #668:
URL: https://github.com/apache/maven/pull/668#discussion_r805247538



##########
File path: maven-core/src/main/java/org/apache/maven/DefaultMaven.java
##########
@@ -369,47 +380,54 @@ private void validateLocalRepository( 
MavenExecutionRequest request )
     {
         Collection<AbstractMavenLifecycleParticipant> lifecycleListeners = new 
LinkedHashSet<>();
 
-        ClassLoader originalClassLoader = 
Thread.currentThread().getContextClassLoader();
         try
         {
-            try
-            {
-                lifecycleListeners.addAll( container.lookupList( 
AbstractMavenLifecycleParticipant.class ) );
-            }
-            catch ( ComponentLookupException e )
-            {
-                // this is just silly, lookupList should return an empty list!
-                logger.warn( "Failed to lookup lifecycle participants: " + 
e.getMessage() );
-            }
+            lifecycleListeners.addAll( container.lookupList( 
AbstractMavenLifecycleParticipant.class ) );
+        }
+        catch ( ComponentLookupException e )
+        {
+            // this is just silly, lookupList should return an empty list!
+            logger.warn( "Failed to lookup lifecycle participants: " + 
e.getMessage() );
+        }
+
+        lifecycleListeners.addAll( getProjectScopedExtensions( projects, 
AbstractMavenLifecycleParticipant.class ) );
 
-            Collection<ClassLoader> scannedRealms = new HashSet<>();
+        return lifecycleListeners;
+    }
 
+    protected <T> Collection<T> getProjectScopedExtensions( 
Collection<MavenProject> projects, Class<T> role )

Review comment:
       I copied it over from master to make it even.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to