[MNG-6114] Elements from the global settings should be ordered before elements from the user settings

This closes #142 and closes #418
This commit is contained in:
Christian Schulte 2016-11-12 21:06:19 +01:00 committed by Michael Osipov
parent d740200811
commit b23116d626
1 changed files with 4 additions and 1 deletions

View File

@ -111,6 +111,7 @@ public class MavenSettingsMerger
String recessiveSourceLevel )
{
Map<String, T> dominantById = mapById( dominant );
final List<T> identifiables = new ArrayList<>( recessive.size() );
for ( T identifiable : recessive )
{
@ -118,9 +119,11 @@ public class MavenSettingsMerger
{
identifiable.setSourceLevel( recessiveSourceLevel );
dominant.add( identifiable );
identifiables.add( identifiable );
}
}
dominant.addAll( 0, identifiables );
}
/**