mirror of https://github.com/apache/maven.git
[MNG-4536] Long build time - enforcer running too many times
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@904188 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
811c97ec30
commit
c18b8872de
|
@ -217,7 +217,7 @@ public class DefaultLifecycleExecutor
|
||||||
logger.debug( "-----------------------------------------------------------------------" );
|
logger.debug( "-----------------------------------------------------------------------" );
|
||||||
logger.debug( "Goal: " + mojoExecId );
|
logger.debug( "Goal: " + mojoExecId );
|
||||||
logger.debug( "Style: "
|
logger.debug( "Style: "
|
||||||
+ ( mojoExecution.getMojoDescriptor().isAggregating() ? "Aggregating" : "Regular" ) );
|
+ ( mojoExecution.getMojoDescriptor().isAggregator() ? "Aggregating" : "Regular" ) );
|
||||||
logger.debug( "Configuration: " + mojoExecution.getConfiguration() );
|
logger.debug( "Configuration: " + mojoExecution.getConfiguration() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,7 +490,7 @@ public class DefaultLifecycleExecutor
|
||||||
this.scopesToCollect = new TreeSet<String>();
|
this.scopesToCollect = new TreeSet<String>();
|
||||||
this.scopesToResolve = new TreeSet<String>();
|
this.scopesToResolve = new TreeSet<String>();
|
||||||
collectDependencyRequirements( scopesToResolve, scopesToCollect, mojoExecution );
|
collectDependencyRequirements( scopesToResolve, scopesToCollect, mojoExecution );
|
||||||
this.aggregating = mojoExecution.getMojoDescriptor().isAggregating();
|
this.aggregating = mojoExecution.getMojoDescriptor().isAggregator();
|
||||||
}
|
}
|
||||||
|
|
||||||
public DependencyContext clone()
|
public DependencyContext clone()
|
||||||
|
@ -821,7 +821,7 @@ public class DefaultLifecycleExecutor
|
||||||
|
|
||||||
MojoDescriptor mojoDescriptor = getMojoDescriptor( task, session, session.getTopLevelProject() );
|
MojoDescriptor mojoDescriptor = getMojoDescriptor( task, session, session.getTopLevelProject() );
|
||||||
|
|
||||||
boolean aggregating = mojoDescriptor.isAggregating();
|
boolean aggregating = mojoDescriptor.isAggregator() || !mojoDescriptor.isProjectRequired();
|
||||||
|
|
||||||
if ( currentSegment == null || currentSegment.aggregating != aggregating )
|
if ( currentSegment == null || currentSegment.aggregating != aggregating )
|
||||||
{
|
{
|
||||||
|
@ -1135,7 +1135,7 @@ public class DefaultLifecycleExecutor
|
||||||
|
|
||||||
List<MavenProject> forkedProjects;
|
List<MavenProject> forkedProjects;
|
||||||
|
|
||||||
if ( mojoDescriptor.isAggregating() )
|
if ( mojoDescriptor.isAggregator() )
|
||||||
{
|
{
|
||||||
forkedProjects = session.getProjects();
|
forkedProjects = session.getProjects();
|
||||||
}
|
}
|
||||||
|
|
|
@ -642,14 +642,6 @@ public class MojoDescriptor
|
||||||
return executeGoal;
|
return executeGoal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return {@code true} if this mojo is aggregating projects, {@code false} otherwise.
|
|
||||||
*/
|
|
||||||
public boolean isAggregating()
|
|
||||||
{
|
|
||||||
return isAggregator() || !isProjectRequired();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {@code true} if this mojo forks either a goal or the lifecycle, {@code false} otherwise.
|
* @return {@code true} if this mojo forks either a goal or the lifecycle, {@code false} otherwise.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue