correct no project handling (eg archetype:create)

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@226540 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-07-30 16:04:02 +00:00
parent 5e75912ed1
commit 47744229e8
1 changed files with 30 additions and 27 deletions

View File

@ -144,17 +144,19 @@ public class DefaultMaven
// the reasoning here is that the list is still unsorted according to dependency, so the first project // the reasoning here is that the list is still unsorted according to dependency, so the first project
// SHOULD BE the top-level, or the one we want to start with if we're doing an aggregated build. // SHOULD BE the top-level, or the one we want to start with if we're doing an aggregated build.
if ( !projects.isEmpty() )
{
// TODO: !![jc; 28-jul-2005] check this; if we're using '-r' and there are aggregator tasks, this will result in weirdness. // TODO: !![jc; 28-jul-2005] check this; if we're using '-r' and there are aggregator tasks, this will result in weirdness.
topLevelProject = (MavenProject) projects.get( 0 ); topLevelProject = (MavenProject) projects.get( 0 );
projects = ProjectSorter.getSortedProjects( projects );
projects = ProjectSorter.getSortedProjects(projects); }
else
if ( projects.isEmpty() )
{ {
List externalProfiles = getActiveExternalProfiles( null, request.getSettings() ); List externalProfiles = getActiveExternalProfiles( null, request.getSettings() );
projects.add( topLevelProject = projectBuilder.buildStandaloneSuperProject( request.getLocalRepository(),
projectBuilder.buildStandaloneSuperProject( request.getLocalRepository(), externalProfiles ) ); externalProfiles );
projects.add( topLevelProject );
} }
} }
catch ( IOException e ) catch ( IOException e )
@ -402,7 +404,8 @@ public class DefaultMaven
protected MavenSession createSession( MavenExecutionRequest request, List projects ) protected MavenSession createSession( MavenExecutionRequest request, List projects )
{ {
return new MavenSession( container, request.getSettings(), request.getLocalRepository(), return new MavenSession( container, request.getSettings(), request.getLocalRepository(),
request.getEventDispatcher(), projects, request.getGoals(), request.getBaseDirectory() ); request.getEventDispatcher(), projects, request.getGoals(),
request.getBaseDirectory() );
} }
/** /**