gastaldi commented on a change in pull request #544:
URL: https://github.com/apache/maven/pull/544#discussion_r710379904



##########
File path: 
maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
##########
@@ -187,8 +188,18 @@ public DependencyResolutionResult resolve( 
DependencyResolutionRequest request )
             {
                 if ( !child.getRelocations().isEmpty() )
                 {
-                    logger.warn( "The artifact " + child.getRelocations().get( 
0 ) + " has been relocated to "
-                        + child.getDependency().getArtifact() );
+                    org.eclipse.aether.artifact.Artifact artifact = 
child.getRelocations().get( 0 );
+                    String message = null;
+                    if ( artifact instanceof RelocatedArtifact )
+                    {
+                        message = ( (RelocatedArtifact) artifact 
).getMessage();
+                    }
+                    if ( message == null )
+                    {
+                        message = "The artifact " + artifact + " has been 
relocated to "
+                                + child.getDependency().getArtifact();
+                    }

Review comment:
       How about we show the original message and append the contents of 
`<message>`  if it exists?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to