MNG-3916: fixing the joining of executions in plugin containers.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@727516 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2008-12-17 21:25:46 +00:00
parent 1ba8aa4479
commit 9002e05de5
1 changed files with 7 additions and 8 deletions

View File

@ -301,16 +301,15 @@ public class PomTransformer
continue; continue;
} }
boolean hasAtLeastOneWithoutId = true; boolean processedExecutionWithoutId = false;
for ( ModelContainer executionContainer : executionContainers ) for ( ModelContainer executionContainer : executionContainers )
{ {
if ( hasAtLeastOneWithoutId ) if ( !hasExecutionId( executionContainer ) )
{ {
hasAtLeastOneWithoutId = hasExecutionId( executionContainer ); processedExecutionWithoutId = true;
} }
else if ( !hasExecutionId( executionContainer ) && processedExecutionWithoutId )
if ( !hasAtLeastOneWithoutId && !hasExecutionId( executionContainer ) && executionContainers.indexOf( executionContainer ) > 0 )
{ {
removeProperties.addAll( executionContainer.getProperties() ); removeProperties.addAll( executionContainer.getProperties() );
} }