mirror of https://github.com/apache/maven.git
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:
parent
61a5d19c4e
commit
2560c1e0bb
|
@ -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<ModelProperty> modelProperties )
|
||||
{
|
||||
for ( ModelProperty mp : modelProperties )
|
||||
{
|
||||
{
|
||||
if ( mp.getUri().equals( projectUri ) )
|
||||
{
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue