mirror of https://github.com/apache/maven.git
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:
parent
5e75912ed1
commit
47744229e8
|
@ -144,17 +144,19 @@ public class DefaultMaven
|
|||
// 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.
|
||||
|
||||
// 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 );
|
||||
|
||||
projects = ProjectSorter.getSortedProjects(projects);
|
||||
|
||||
if ( projects.isEmpty() )
|
||||
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.
|
||||
topLevelProject = (MavenProject) projects.get( 0 );
|
||||
projects = ProjectSorter.getSortedProjects( projects );
|
||||
}
|
||||
else
|
||||
{
|
||||
List externalProfiles = getActiveExternalProfiles( null, request.getSettings() );
|
||||
|
||||
projects.add(
|
||||
projectBuilder.buildStandaloneSuperProject( request.getLocalRepository(), externalProfiles ) );
|
||||
topLevelProject = projectBuilder.buildStandaloneSuperProject( request.getLocalRepository(),
|
||||
externalProfiles );
|
||||
projects.add( topLevelProject );
|
||||
}
|
||||
}
|
||||
catch ( IOException e )
|
||||
|
@ -402,7 +404,8 @@ public class DefaultMaven
|
|||
protected MavenSession createSession( MavenExecutionRequest request, List projects )
|
||||
{
|
||||
return new MavenSession( container, request.getSettings(), request.getLocalRepository(),
|
||||
request.getEventDispatcher(), projects, request.getGoals(), request.getBaseDirectory() );
|
||||
request.getEventDispatcher(), projects, request.getGoals(),
|
||||
request.getBaseDirectory() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue