o don't let inherited executions from plugin management containers be appended, they need to be overridden if there is no execution id

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@727623 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2008-12-18 03:16:52 +00:00
parent 61a5d19c4e
commit 2560c1e0bb
1 changed files with 8 additions and 7 deletions

View File

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