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
This commit is contained in:
Milos Kleint 2008-01-20 19:54:09 +00:00
parent b2dab2e0d5
commit c8b4b7294c
1 changed files with 13 additions and 4 deletions

View File

@ -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;
@ -95,11 +94,15 @@ public class DefaultBuildExtensionScanner
{
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,
@ -306,6 +313,8 @@ public class DefaultBuildExtensionScanner
throw new MissingModuleException( moduleSubpath, modulePomDirectory, containingPom );
}
reactorFiles.add( modulePomDirectory );
scanInternal( modulePomDirectory, request, visitedModelIds, reactorFiles );
}
}