From c8b4b7294c1d606cc68e414a0979e1bbf6c16973 Mon Sep 17 00:00:00 2001 From: Milos Kleint Date: Sun, 20 Jan 2008 19:54:09 +0000 Subject: [PATCH] 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. git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@613662 13f79535-47bb-0310-9956-ffa450edef68 --- .../extension/DefaultBuildExtensionScanner.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java b/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java index 3f38f22649..e4e0dcf74c 100644 --- a/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java +++ b/maven-core/src/main/java/org/apache/maven/extension/DefaultBuildExtensionScanner.java @@ -46,7 +46,6 @@ import org.codehaus.plexus.logging.console.ConsoleLogger; 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 @@ public class DefaultBuildExtensionScanner 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 @@ public class DefaultBuildExtensionScanner 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 @@ public class DefaultBuildExtensionScanner { throw new MissingModuleException( moduleSubpath, modulePomDirectory, containingPom ); } - + + reactorFiles.add( modulePomDirectory ); + scanInternal( modulePomDirectory, request, visitedModelIds, reactorFiles ); } }