[MNG-6127] Fix plugin execution configuration interference Signed-off-by: rfscholte <rfscho...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/f1ed6592 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/f1ed6592 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/f1ed6592 Branch: refs/heads/MNG-6255 Commit: f1ed6592b1c701834d1377fade6cdb382a63bbf4 Parents: 842db37 Author: Mario Krizmanic <mario.krizma...@gmail.com> Authored: Tue Aug 15 21:46:29 2017 +0200 Committer: rfscholte <rfscho...@apache.org> Committed: Tue Aug 15 21:46:29 2017 +0200 ---------------------------------------------------------------------- .../internal/DefaultLifecyclePluginAnalyzer.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/f1ed6592/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java ---------------------------------------------------------------------- diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java index aec785f..14653b7 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/internal/DefaultLifecyclePluginAnalyzer.java @@ -31,6 +31,7 @@ import org.codehaus.plexus.component.annotations.Component; import org.codehaus.plexus.component.annotations.Requirement; import org.codehaus.plexus.logging.Logger; import org.codehaus.plexus.util.StringUtils; +import org.codehaus.plexus.util.xml.Xpp3Dom; import java.util.ArrayList; import java.util.Collections; @@ -190,8 +191,13 @@ public class DefaultLifecyclePluginAnalyzer execution.setPhase( phase ); execution.setPriority( i - mojos.size() ); 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.getExecutions().add( execution ); }