Repository: maven Updated Branches: refs/heads/master c37ea4273 -> 5cf2b135c
[MNG-5958] restore binary compatibility of Lifecycle.setPhases While MNG-5805 restored binary compatibility of Lifecycle.getPhases it didn't do the same for Lifecycle.setPhases. This breaks plugins like flexmojos-maven-plugin which have their own lifecycle mapping implementations. This closes #77 Project: http://git-wip-us.apache.org/repos/asf/maven/repo Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/5cf2b135 Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/5cf2b135 Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/5cf2b135 Branch: refs/heads/master Commit: 5cf2b135ca49b3be77ced86d0b44b990b702acab Parents: c37ea42 Author: Stuart McCulloch <[email protected]> Authored: Wed Jan 6 11:23:06 2016 +0000 Committer: Christian Schulte <[email protected]> Committed: Thu Feb 11 05:17:19 2016 +0100 ---------------------------------------------------------------------- .../java/org/apache/maven/lifecycle/mapping/Lifecycle.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven/blob/5cf2b135/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java ---------------------------------------------------------------------- diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java index d2b6d6c..c14cf94 100644 --- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java +++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/Lifecycle.java @@ -106,8 +106,13 @@ public class Lifecycle } @Deprecated - public void setPhases( Map<String, LifecyclePhase> phases ) + public void setPhases( Map<String, String> phases ) { - setLifecyclePhases( phases ); + Map<String, LifecyclePhase> lphases = new LinkedHashMap<>(); + for ( Map.Entry<String, String> e: phases.entrySet() ) + { + lphases.put( e.getKey(), new LifecyclePhase( e.getValue() ) ); + } + setLifecyclePhases( lphases ); } }
