maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From schu...@apache.org
Subject maven git commit: [MNG-5971] Imported dependencies should be available to inheritance processing
Date Tue, 23 Feb 2016 14:08:12 GMT
Repository: maven
Updated Branches:
  refs/heads/master 8b751f6a8 -> f08e9558d


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

o Updated to correct a 'NullPointerException' thrown when there is no pom file
  to report.


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

Branch: refs/heads/master
Commit: f08e9558df564319efe91839d03c1be03b6833f8
Parents: 8b751f6
Author: Christian Schulte <schulte@apache.org>
Authored: Tue Feb 23 14:54:55 2016 +0100
Committer: Christian Schulte <schulte@apache.org>
Committed: Tue Feb 23 14:54:55 2016 +0100

----------------------------------------------------------------------
 .../model/composition/DefaultDependencyManagementImporter.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/f08e9558/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java
b/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java
index 0854477..831e754 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/composition/DefaultDependencyManagementImporter.java
@@ -107,14 +107,16 @@ public class DefaultDependencyManagementImporter
                     problems.add( new ModelProblemCollectorRequest( ModelProblem.Severity.WARNING,
                                                                     ModelProblem.Version.BASE
).
                         setMessage( String.format(
-                                "Multiple conflicting imports of dependency '%1$s' into model
'%2$s' @ '%3$s' (%4$s). "
+                                "Multiple conflicting imports of dependency '%1$s' into model
'%2$s'%3$s(%4$s). "
                                     + "To resolve this conflict, either declare the dependency
directly "
                                     + "in model '%2$s' to override what gets imported or
rearrange the causing "
                                     + "imports in the inheritance hierarchy to apply standard
override logic. "
                                     + "Without resolving this conflict, your build relies
on indeterministic "
                                     + "behaviour.",
                                 conflictingDependencies.get( 0 ).getManagementKey(), target.getId(),
-                                target.getPomFile().getAbsolutePath(), conflictsBuilder.substring(
2 ) ) ) );
+                                target.getPomFile() != null
+                                    ? " @ '" + target.getPomFile().getAbsolutePath() + "'
"
+                                    : " ", conflictsBuilder.substring( 2 ) ) ) );
 
                 }
             }


Mime
View raw message