Repository: maven
Updated Branches:
  refs/heads/master b5b82988a -> c05916675


[MNG-5661] Make MavenProject instances immutable after initial construction

o Updated to restore former ordering of various sets. The following core
  integration test is failing sporadically on windows:

  testitUseHttpProxyForWebDAV:
    org.apache.maven.it.MavenITmng3599useHttpProxyForWebDAVTest

  The fix to this issue back then was to retain ordering of extension artifacts.
  The update due to MNG-5661 removed that ordering which may be the cause for
  the sporadic failures. MNG-3599 has a link to

  MNG-3805 Ordering of extension class path is indeterministic

  Even if this is not the cause for the sporadic IT failures, it restores
  former behaviour.


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/c0591667
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/c0591667
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/c0591667

Branch: refs/heads/master
Commit: c059166753f889736f11da77f93888d67f075619
Parents: b5b8298
Author: Christian Schulte <schu...@apache.org>
Authored: Fri Dec 23 21:48:39 2016 +0100
Committer: Christian Schulte <schu...@apache.org>
Committed: Fri Dec 23 21:56:08 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/maven/project/DefaultProjectBuilder.java  | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/c0591667/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
----------------------------------------------------------------------
diff --git 
a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java 
b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
index e6692d8..a10deac 100644
--- 
a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
+++ 
b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
@@ -25,7 +25,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
@@ -724,7 +723,7 @@ public class DefaultProjectBuilder
         project.setProjectBuildingRequest( projectBuildingRequest );
 
         // pluginArtifacts
-        Set<Artifact> pluginArtifacts = new HashSet<>();
+        Set<Artifact> pluginArtifacts = new LinkedHashSet<>();
         for ( Plugin plugin : project.getBuildPlugins() )
         {
             Artifact artifact = repositorySystem.createPluginArtifact( plugin 
);
@@ -737,7 +736,7 @@ public class DefaultProjectBuilder
         project.setPluginArtifacts( pluginArtifacts );
 
         // reportArtifacts
-        Set<Artifact> reportArtifacts = new HashSet<>();
+        Set<Artifact> reportArtifacts = new LinkedHashSet<>();
         for ( ReportPlugin report : project.getReportPlugins() )
         {
             Plugin pp = new Plugin();
@@ -755,7 +754,7 @@ public class DefaultProjectBuilder
         project.setReportArtifacts( reportArtifacts );
 
         // extensionArtifacts
-        Set<Artifact> extensionArtifacts = new HashSet<>();
+        Set<Artifact> extensionArtifacts = new LinkedHashSet<>();
         List<Extension> extensions = project.getBuildExtensions();
         if ( extensions != null )
         {

Reply via email to