mirror of https://github.com/apache/maven.git
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:
parent
1ba8aa4479
commit
9002e05de5
|
@ -301,24 +301,23 @@ 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() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
props.removeAll( removeProperties );
|
props.removeAll( removeProperties );
|
||||||
|
|
||||||
for(ModelEventListener listener : eventListeners)
|
for(ModelEventListener listener : eventListeners)
|
||||||
{
|
{
|
||||||
ModelDataSource ds = new DefaultModelDataSource();
|
ModelDataSource ds = new DefaultModelDataSource();
|
||||||
|
@ -752,7 +751,7 @@ public class PomTransformer
|
||||||
private static boolean hasProjectUri( String projectUri, List<ModelProperty> modelProperties )
|
private static boolean hasProjectUri( String projectUri, List<ModelProperty> modelProperties )
|
||||||
{
|
{
|
||||||
for ( ModelProperty mp : modelProperties )
|
for ( ModelProperty mp : modelProperties )
|
||||||
{
|
{
|
||||||
if ( mp.getUri().equals( projectUri ) )
|
if ( mp.getUri().equals( projectUri ) )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue