mirror of https://github.com/apache/maven.git
no root project in reactor
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@291251 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0fbd59f4f8
commit
661051200d
|
@ -172,8 +172,8 @@ public class DefaultLifecycleExecutor
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void executeTaskSegments( List taskSegments, ReactorManager rm, MavenSession session, MavenProject project,
|
private void executeTaskSegments( List taskSegments, ReactorManager rm, MavenSession session,
|
||||||
EventDispatcher dispatcher )
|
MavenProject rootProject, EventDispatcher dispatcher )
|
||||||
throws PluginNotFoundException, MojoExecutionException, ArtifactResolutionException, LifecycleExecutionException
|
throws PluginNotFoundException, MojoExecutionException, ArtifactResolutionException, LifecycleExecutionException
|
||||||
{
|
{
|
||||||
for ( Iterator it = taskSegments.iterator(); it.hasNext(); )
|
for ( Iterator it = taskSegments.iterator(); it.hasNext(); )
|
||||||
|
@ -182,11 +182,11 @@ public class DefaultLifecycleExecutor
|
||||||
|
|
||||||
if ( segment.aggregate() )
|
if ( segment.aggregate() )
|
||||||
{
|
{
|
||||||
if ( !rm.isBlackListed( project ) )
|
if ( !rm.isBlackListed( rootProject ) )
|
||||||
{
|
{
|
||||||
line();
|
line();
|
||||||
|
|
||||||
getLogger().info( "Building " + project.getName() );
|
getLogger().info( "Building " + rootProject.getName() );
|
||||||
|
|
||||||
getLogger().info( " " + segment );
|
getLogger().info( " " + segment );
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ public class DefaultLifecycleExecutor
|
||||||
// Event monitoring.
|
// Event monitoring.
|
||||||
String event = MavenEvents.PROJECT_EXECUTION;
|
String event = MavenEvents.PROJECT_EXECUTION;
|
||||||
|
|
||||||
dispatcher.dispatchStart( event, project.getId() + " ( " + segment + " )" );
|
dispatcher.dispatchStart( event, rootProject.getId() + " ( " + segment + " )" );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -207,23 +207,23 @@ public class DefaultLifecycleExecutor
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
executeGoal( task, session, project );
|
executeGoal( task, session, rootProject );
|
||||||
}
|
}
|
||||||
catch ( MojoExecutionException e )
|
catch ( MojoExecutionException e )
|
||||||
{
|
{
|
||||||
handleExecutionFailure( rm, project, e, task );
|
handleExecutionFailure( rm, rootProject, e, task );
|
||||||
}
|
}
|
||||||
catch ( ArtifactResolutionException e )
|
catch ( ArtifactResolutionException e )
|
||||||
{
|
{
|
||||||
handleExecutionFailure( rm, project, e, task );
|
handleExecutionFailure( rm, rootProject, e, task );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatcher.dispatchEnd( event, project.getId() + " ( " + segment + " )" );
|
dispatcher.dispatchEnd( event, rootProject.getId() + " ( " + segment + " )" );
|
||||||
}
|
}
|
||||||
catch ( LifecycleExecutionException e )
|
catch ( LifecycleExecutionException e )
|
||||||
{
|
{
|
||||||
dispatcher.dispatchError( event, project.getId() + " ( " + segment + " )", e );
|
dispatcher.dispatchError( event, rootProject.getId() + " ( " + segment + " )", e );
|
||||||
|
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ public class DefaultLifecycleExecutor
|
||||||
{
|
{
|
||||||
line();
|
line();
|
||||||
|
|
||||||
getLogger().info( "SKIPPING " + project.getName() );
|
getLogger().info( "SKIPPING " + rootProject.getName() );
|
||||||
|
|
||||||
getLogger().info( " " + segment );
|
getLogger().info( " " + segment );
|
||||||
|
|
||||||
|
@ -279,11 +279,11 @@ public class DefaultLifecycleExecutor
|
||||||
}
|
}
|
||||||
catch ( MojoExecutionException e )
|
catch ( MojoExecutionException e )
|
||||||
{
|
{
|
||||||
handleExecutionFailure( rm, project, e, task );
|
handleExecutionFailure( rm, currentProject, e, task );
|
||||||
}
|
}
|
||||||
catch ( ArtifactResolutionException e )
|
catch ( ArtifactResolutionException e )
|
||||||
{
|
{
|
||||||
handleExecutionFailure( rm, project, e, task );
|
handleExecutionFailure( rm, currentProject, e, task );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -349,6 +349,9 @@ public class DefaultLifecycleExecutor
|
||||||
{
|
{
|
||||||
List segments = new ArrayList();
|
List segments = new ArrayList();
|
||||||
|
|
||||||
|
if ( project != null )
|
||||||
|
{
|
||||||
|
|
||||||
TaskSegment currentSegment = null;
|
TaskSegment currentSegment = null;
|
||||||
for ( Iterator it = tasks.iterator(); it.hasNext(); )
|
for ( Iterator it = tasks.iterator(); it.hasNext(); )
|
||||||
{
|
{
|
||||||
|
@ -429,6 +432,15 @@ public class DefaultLifecycleExecutor
|
||||||
}
|
}
|
||||||
|
|
||||||
segments.add( currentSegment );
|
segments.add( currentSegment );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TaskSegment segment = new TaskSegment( false );
|
||||||
|
for ( Iterator i = tasks.iterator(); i.hasNext(); )
|
||||||
|
{
|
||||||
|
segment.add( (String) i.next() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return segments;
|
return segments;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,11 +141,8 @@ public class DefaultPluginManager
|
||||||
{
|
{
|
||||||
// TODO: since this is only used in the lifecycle executor, maybe it should be moved there? There is no other
|
// TODO: since this is only used in the lifecycle executor, maybe it should be moved there? There is no other
|
||||||
// use for the mapping manager in here
|
// use for the mapping manager in here
|
||||||
Settings settings = session.getSettings();
|
return pluginMappingManager.getByPrefix( prefix, session.getSettings().getPluginGroups(),
|
||||||
List pluginGroups = settings.getPluginGroups();
|
project.getPluginArtifactRepositories(),
|
||||||
if ( pluginMappingManager == null ) throw new NullPointerException( "pluginMappingManager was null" );
|
|
||||||
if ( project == null ) throw new NullPointerException( "project was null" );
|
|
||||||
return pluginMappingManager.getByPrefix( prefix, pluginGroups, project.getPluginArtifactRepositories(),
|
|
||||||
session.getLocalRepository() );
|
session.getLocalRepository() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue