michael-o commented on a change in pull request #543:
URL: https://github.com/apache/maven/pull/543#discussion_r711234574



##########
File path: 
maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReader.java
##########
@@ -319,10 +323,20 @@ private Model loadPom( RepositorySystemSession session, 
ArtifactDescriptorReques
             if ( relocation != null )
             {
                 result.addRelocation( a );
-                a =
+                Artifact relocatedArtifact =
                     new RelocatedArtifact( a, relocation.getGroupId(), 
relocation.getArtifactId(),
                                            relocation.getVersion() );
-                result.setArtifact( a );
+                if ( LOGGER.isWarnEnabled() )
+                {
+                    String message = "The artifact " + a + " has been 
relocated to " + relocatedArtifact;
+                    if ( relocation.getMessage() != null )
+                    {
+                        message += ": " + relocation.getMessage();
+                    }
+                    LOGGER.warn( message );
+                }
+                result.setArtifact( relocatedArtifact );
+                a = relocatedArtifact;

Review comment:
       I know, but why is redefining this variable which isn't used in the loop 
anymore fixes the issue?




-- 
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