You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sc...@apache.org on 2016/06/17 19:36:07 UTC

[10/20] maven git commit: [MNG-5971] Imported dependencies should be available to inheritance processing

[MNG-5971] Imported dependencies should be available to inheritance processing

o Updated to revert changes to the value returned by 'ModelProblem.getSource'.
  This value should be the path to the POM the 'ModelProblem' corresponds to.
  It was changed to hold additional information (the path to the imported POM).
  Most of the time those POM files will not be part of the reactor and the
  location will always be the path of the POM in the local repository. During
  preliminary testing it turned out that at leat m2eclipse relies on that
  value to represent a single path. There may be other tools depending on
  this. Those tools should not need to start parsing the value without gaining
  any benefit.


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

Branch: refs/heads/MNG-6006
Commit: ded1379ebf5d5ee943d52cf12e6d368b5d54ce70
Parents: c15e5c3
Author: Christian Schulte <sc...@apache.org>
Authored: Tue Jun 14 19:48:02 2016 +0200
Committer: Christian Schulte <sc...@apache.org>
Committed: Tue Jun 14 19:48:02 2016 +0200

----------------------------------------------------------------------
 .../model/building/DefaultModelProblemCollector.java    | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/ded1379e/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
index 16740dc..e46cc98 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblemCollector.java
@@ -160,13 +160,11 @@ class DefaultModelProblemCollector
             }
         }
 
-        modelId = modelId != null
-                      ? this.getModelId() + " [" + modelId + "]"
-                      : this.getModelId();
-
-        src = src != null
-                  ? this.getSource() + " [" + src + "]"
-                  : this.getSource();
+        if ( modelId == null )
+        {
+            modelId = getModelId();
+            src = getSource();
+        }
 
         if ( line <= 0 && column <= 0 && req.getException() instanceof ModelParseException )
         {