[MNG-6127] Fix plugin execution configuration interference

Signed-off-by: rfscholte <rfscholte@apache.org>
This commit is contained in:
Mario Krizmanic 2017-08-15 21:46:29 +02:00 committed by rfscholte
parent 842db371f0
commit f1ed6592b1
1 changed files with 8 additions and 2 deletions

View File

@ -31,6 +31,7 @@ import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement; import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.logging.Logger;
import org.codehaus.plexus.util.StringUtils; import org.codehaus.plexus.util.StringUtils;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -190,8 +191,13 @@ public class DefaultLifecyclePluginAnalyzer
execution.setPhase( phase ); execution.setPhase( phase );
execution.setPriority( i - mojos.size() ); execution.setPriority( i - mojos.size() );
execution.getGoals().add( gs.goal ); execution.getGoals().add( gs.goal );
execution.setConfiguration( mojo.getConfiguration() );
Xpp3Dom lifecycleConfiguration = mojo.getConfiguration();
if ( lifecycleConfiguration != null )
{
execution.setConfiguration( new Xpp3Dom( lifecycleConfiguration ) );
}
plugin.setDependencies( mojo.getDependencies() ); plugin.setDependencies( mojo.getDependencies() );
plugin.getExecutions().add( execution ); plugin.getExecutions().add( execution );
} }