This is an automated email from the ASF dual-hosted git repository. michaelo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/master by this push: new b23116d [MNG-6114] Elements from the global settings should be ordered before elements from the user settings b23116d is described below commit b23116d6268b50e3aafff3fcd39dcbf300ecbdd4 Author: Christian Schulte <schu...@apache.org> AuthorDate: Sat Nov 12 21:06:19 2016 +0100 [MNG-6114] Elements from the global settings should be ordered before elements from the user settings This closes #142 and closes #418 --- .../java/org/apache/maven/settings/merge/MavenSettingsMerger.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java index 8d9f67b..cb5f6c1 100644 --- a/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java +++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java @@ -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 ); } /**