mirror of https://github.com/apache/maven.git
Fixing site-generation and other plugins that require reports.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@630048 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f88f9df9ff
commit
22817a2444
|
@ -8,7 +8,6 @@ import org.apache.maven.lifecycle.NoSuchPhaseException;
|
|||
import org.apache.maven.lifecycle.model.LifecycleBinding;
|
||||
import org.apache.maven.lifecycle.model.LifecycleBindings;
|
||||
import org.apache.maven.lifecycle.model.MojoBinding;
|
||||
import org.apache.maven.lifecycle.model.Phase;
|
||||
import org.apache.maven.lifecycle.statemgmt.StateManagementUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -87,27 +86,11 @@ public class BuildPlan
|
|||
}
|
||||
|
||||
public void markFullyResolved()
|
||||
throws NoSuchPhaseException
|
||||
{
|
||||
for ( Iterator bindingIterator = bindings.getBindingList().iterator(); bindingIterator.hasNext(); )
|
||||
{
|
||||
LifecycleBinding binding = (LifecycleBinding) bindingIterator.next();
|
||||
List bindings = renderExecutionPlan( new Stack() );
|
||||
|
||||
for ( Iterator phaseIterator = binding.getPhasesInOrder().iterator(); phaseIterator.hasNext(); )
|
||||
{
|
||||
Phase phase = (Phase) phaseIterator.next();
|
||||
|
||||
for ( Iterator mojoBindingIterator = phase.getBindings().iterator(); mojoBindingIterator.hasNext(); )
|
||||
{
|
||||
MojoBinding mojoBinding = (MojoBinding) mojoBindingIterator.next();
|
||||
|
||||
String key = MojoBindingUtils.createMojoBindingKey( mojoBinding, false );
|
||||
|
||||
fullyResolvedBindings.add( key );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for ( Iterator it = directInvocationBindings.values().iterator(); it.hasNext(); )
|
||||
for ( Iterator it = bindings.iterator(); it.hasNext(); )
|
||||
{
|
||||
MojoBinding mojoBinding = (MojoBinding) it.next();
|
||||
|
||||
|
|
|
@ -208,6 +208,7 @@ public class DefaultBuildPlanner
|
|||
{
|
||||
if ( plan.isIncludingReports() )
|
||||
{
|
||||
logger.debug( "Report modifiers are already present in the build plan." );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -220,6 +221,7 @@ public class DefaultBuildPlanner
|
|||
|
||||
if ( plan.isFullyResolved( mojoBinding ) )
|
||||
{
|
||||
logger.debug( "Skipping report-discovery for mojo: " + MojoBindingUtils.toString( mojoBinding ) + "; it is already fully resolved in the build plan." );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -230,6 +232,7 @@ public class DefaultBuildPlanner
|
|||
|
||||
if ( pluginDescriptor == null )
|
||||
{
|
||||
logger.debug( "Plugin descriptor not found for mojo: " + MojoBindingUtils.toString( mojoBinding ) + "; skipping for report-discovery." );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -243,6 +246,7 @@ public class DefaultBuildPlanner
|
|||
|
||||
if ( mojoDescriptor.isRequiresReports() )
|
||||
{
|
||||
logger.debug( "Mojo: " + MojoBindingUtils.toString( mojoBinding ) + " requires reports; running report-discovery." );
|
||||
List reportBindings = lifecycleBindingManager.getReportBindings( project, session );
|
||||
|
||||
if ( reportBindings != null )
|
||||
|
|
Loading…
Reference in New Issue