From 2560c1e0bb80fc5c71083c37ce9490727f3f3502 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Thu, 18 Dec 2008 03:16:52 +0000 Subject: [PATCH] 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 --- .../maven/project/builder/PomTransformer.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/maven-project-builder/src/main/java/org/apache/maven/project/builder/PomTransformer.java b/maven-project-builder/src/main/java/org/apache/maven/project/builder/PomTransformer.java index 3a34d17ad7..b08dafed70 100644 --- a/maven-project-builder/src/main/java/org/apache/maven/project/builder/PomTransformer.java +++ b/maven-project-builder/src/main/java/org/apache/maven/project/builder/PomTransformer.java @@ -301,23 +301,24 @@ public class PomTransformer continue; } - boolean processedExecutionWithoutId = false; + boolean hasAtLeastOneWithoutId = true; 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() ); - } + } } } props.removeAll( removeProperties ); - + for(ModelEventListener listener : eventListeners) { ModelDataSource ds = new DefaultModelDataSource(); @@ -751,7 +752,7 @@ public class PomTransformer private static boolean hasProjectUri( String projectUri, List modelProperties ) { for ( ModelProperty mp : modelProperties ) - { + { if ( mp.getUri().equals( projectUri ) ) { return true;