[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
This commit is contained in:
Stuart McCulloch 2016-01-06 11:23:06 +00:00 committed by Christian Schulte
parent f20a5d940b
commit 6b31c4a556
1 changed files with 7 additions and 2 deletions

View File

@ -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 );
}
}