Author: mkleint
Date: Sun Jan 20 11:54:09 2008
New Revision: 613662

URL: http://svn.apache.org/viewvc?rev=613662&view=rev
Log:
the reactorpoms modules need to be checked recursively to satisfy this case:
parent --> submodule -->subsubmodule --> subsubsubmodule where parent defines a 
plugin with extensions in pluginManagement section and the subsubmodule is the 
one using the  plugin.

Modified:
    
maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java

Modified: 
maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java
URL: 
http://svn.apache.org/viewvc/maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java?rev=613662&r1=613661&r2=613662&view=diff
==============================================================================
--- 
maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java
 (original)
+++ 
maven/components/trunk/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java
 Sun Jan 20 11:54:09 2008
@@ -46,7 +46,6 @@
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
@@ -94,12 +93,16 @@
         throws ExtensionScanningException, MissingModuleException
     {
         List visited = new ArrayList();
+        
+        List internalFiles = new ArrayList();
+        
+        internalFiles.addAll(files);
 
         for ( Iterator it = files.iterator(); it.hasNext(); )
         {
             File pom = (File) it.next();
 
-            scanInternal( pom, request, visited, files );
+            scanInternal( pom, request, visited, internalFiles );
         }
     }
 
@@ -107,7 +110,11 @@
                                         MavenExecutionRequest request )
         throws ExtensionScanningException, MissingModuleException
     {
-        scanInternal( pom, request, new ArrayList(), 
Collections.singletonList( pom ) );
+        List internalFiles = new ArrayList();
+        
+        internalFiles.add( pom );
+        
+        scanInternal( pom, request, new ArrayList(), internalFiles );
     }
 
     private void scanInternal( File pom,
@@ -305,7 +312,9 @@
                 {
                     throw new MissingModuleException( moduleSubpath, 
modulePomDirectory, containingPom );
                 }
-
+                
+                reactorFiles.add( modulePomDirectory );
+                
                 scanInternal( modulePomDirectory, request, visitedModelIds, 
reactorFiles );
             }
         }


Reply via email to