aggregator must resolve deps

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@279053 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-09-06 18:19:43 +00:00
parent 42fbee9910
commit 2464320d3a
1 changed files with 17 additions and 2 deletions

View File

@ -78,6 +78,7 @@ import java.io.IOException;
import java.lang.reflect.Field;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@ -286,9 +287,23 @@ public class DefaultPluginManager
if ( mojoDescriptor.isDependencyResolutionRequired() != null )
{
Collection projects;
resolveTransitiveDependencies( session, artifactResolver, mojoDescriptor
.isDependencyResolutionRequired(), artifactFactory, project );
if ( mojoDescriptor.isAggregator() )
{
projects = session.getSortedProjects();
}
else
{
projects = Collections.singleton( project );
}
for ( Iterator i = projects.iterator(); i.hasNext(); )
{
MavenProject p = (MavenProject) i.next();
resolveTransitiveDependencies( session, artifactResolver,
mojoDescriptor.isDependencyResolutionRequired(), artifactFactory, p );
}
downloadDependencies( project, session, artifactResolver );
}