maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khmarba...@apache.org
Subject [03/15] maven git commit: [MNG-5958] restore binary compatibility of Lifecycle.setPhases
Date Sun, 29 Jan 2017 20:19:24 GMT
[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/6b31c4a5
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/6b31c4a5
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/6b31c4a5

Branch: refs/heads/MNG-6068
Commit: 6b31c4a556f51cd1c2064fe773550c0acf14d307
Parents: f20a5d9
Author: Stuart McCulloch <mcculls@gmail.com>
Authored: Wed Jan 6 11:23:06 2016 +0000
Committer: Christian Schulte <schulte@apache.org>
Committed: Thu Jan 26 20:19:57 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/6b31c4a5/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 );
     }
 }


Mime
View raw message