Fixing issue with different lifecycles getting in the way of one another, as when `mvn clean install` on a maven-plugin project catches the clean:clean binding from the clean lifecycle, and knocks out the plugin:descriptor binding from the beginning of the default lifecycle.

Plugins can now be built using maven trunk once again.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@542734 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2007-05-30 03:00:40 +00:00
parent 38b12ace0c
commit a866905cb4
3 changed files with 9 additions and 1 deletions

View File

@ -155,7 +155,8 @@ public List renderExecutionPlan( final Stack executionStack )
List newRendered = new ArrayList( bindingsToAdd );
// if we've already executed part of the lifecycle, just continue with the new bindings.
if ( ( renderedLifecycleMojos != null ) && ( renderedLifecycleMojos.size() < bindingsToAdd.size() ) )
if ( ( renderedLifecycleMojos != null ) && ( renderedLifecycleMojos.size() < bindingsToAdd.size() )
&& bindingsToAdd.containsAll( renderedLifecycleMojos ) )
{
bindingsToAdd = bindingsToAdd.subList( renderedLifecycleMojos.size(), bindingsToAdd.size() );
}

View File

@ -71,6 +71,7 @@ private void initializeDirectInvocations( final BuildPlan plan, final MavenProje
throws LifecycleSpecificationException, LifecycleLoaderException
{
List tasks = plan.getTasks();
for ( Iterator it = tasks.iterator(); it.hasNext(); )
{
String task = (String) it.next();

View File

@ -564,6 +564,7 @@
<field>
<name>groupId</name>
<required>true</required>
<identifier>true</identifier>
<version>1.0.0</version>
<description>Plugin's groupId.</description>
<type>String</type>
@ -571,6 +572,7 @@
<field>
<name>artifactId</name>
<required>true</required>
<identifier>true</identifier>
<version>1.0.0</version>
<description>Plugin's artifactId.</description>
<type>String</type>
@ -585,6 +587,7 @@
<field>
<name>goal</name>
<required>true</required>
<identifier>true</identifier>
<version>1.0.0</version>
<description>Mojo's goal name.</description>
<type>String</type>
@ -592,6 +595,7 @@
<field>
<name>executionId</name>
<version>1.0.0</version>
<identifier>true</identifier>
<defaultValue>default</defaultValue>
<description>A name for this mojo binding, for purposes of merging configurations via inheritance, etc.</description>
<type>String</type>
@ -615,6 +619,7 @@
<type>boolean</type>
</field>
</fields>
<!--
<codeSegments>
<codeSegment>
<version>1.0.0</version>
@ -627,6 +632,7 @@
]]></code>
</codeSegment>
</codeSegments>
-->
</class>
</classes>
</model>