Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.StringUtils;
import org.eclipse.aether.SessionData;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* <p>
Expand All @@ -75,10 +77,14 @@
@Singleton
public class MojoExecutor
{
private static final Logger LOGGER = LoggerFactory.getLogger( MojoExecutor.class );

private final BuildPluginManager pluginManager;

private final MavenPluginManager mavenPluginManager;

private final LifecycleDependencyResolver lifeCycleDependencyResolver;

private final ExecutionEventCatapult eventCatapult;

private final ReadWriteLock aggregatorLock = new ReentrantReadWriteLock();
Expand Down Expand Up @@ -225,6 +231,16 @@ private void execute( MavenSession session, MojoExecution mojoExecution, Project

try ( ProjectLock lock = new ProjectLock( session, mojoDescriptor, aggregatorLock ) )
{
if ( session.isParallel() && mojoDescriptor.isAggregator() )
{
LOGGER.warn( "===" );
LOGGER.warn( "Executing aggregator Mojo in parallel build:" );
LOGGER.warn( "Aggregator Mojo requires exclusive access to reactor, " );
LOGGER.warn( "to prevent race conditions, an aggregating execution will block" );
LOGGER.warn( "all other executions until finished." );
LOGGER.warn( "===" );
}

doExecute( session, mojoExecution, projectIndex, dependencyContext );
}
}
Expand Down