You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sc...@apache.org on 2017/01/25 22:42:17 UTC

[33/34] maven git commit: [MNG-5958] restore binary compatibility of Lifecycle.setPhases

[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/1cdd0c2b
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/1cdd0c2b
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/1cdd0c2b

Branch: refs/heads/MNG-5958-IT
Commit: 1cdd0c2be545200a11d74c1055dcd0b16d96adc3
Parents: f20a5d9
Author: Stuart McCulloch <mc...@gmail.com>
Authored: Wed Jan 6 11:23:06 2016 +0000
Committer: Christian Schulte <sc...@apache.org>
Committed: Wed Jan 25 23:40:00 2017 +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/1cdd0c2b/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 );
     }
 }