mirror of https://github.com/apache/maven.git
[MNG-6944] Fix ordering lifecycles
This commit is contained in:
parent
bdec668de9
commit
a945ca4ed3
|
@ -124,13 +124,16 @@ public class DefaultLifecycles
|
|||
|
||||
Comparator<String> comparator = ( l, r ) ->
|
||||
{
|
||||
if ( lifecycleIds.contains( l ) )
|
||||
int lx = lifecycleIds.indexOf( l );
|
||||
int rx = lifecycleIds.indexOf( r );
|
||||
|
||||
if ( lx < 0 || rx < 0 )
|
||||
{
|
||||
return lifecycleIds.indexOf( l ) - lifecycleIds.indexOf( r );
|
||||
return rx - lx;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
return Integer.MAX_VALUE;
|
||||
return lx - rx;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue