hboutemy commented on a change in pull request #657:
URL: https://github.com/apache/maven/pull/657#discussion_r789480339
##########
File path:
maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultPluginDependenciesResolver.java
##########
@@ -205,6 +205,22 @@ private DependencyNode resolveInternal( Plugin plugin,
Artifact pluginArtifact,
node = repoSystem.collectDependencies( pluginSession, request
).getRoot();
+ if ( logger.isWarnEnabled() )
+ {
+ for ( DependencyNode child : node.getChildren() )
+ {
+ if ( !child.getRelocations().isEmpty() )
+ {
+ org.eclipse.aether.artifact.Artifact relocated =
child.getDependency().getArtifact();
+ String message = relocated instanceof
org.apache.maven.repository.internal.RelocatedArtifact
+ ? ( (
org.apache.maven.repository.internal.RelocatedArtifact ) relocated
).getMessage()
+ : null;
+ logger.warn( "The artifact " +
child.getRelocations().get( 0 ) + " has been relocated to "
+ + relocated + ( message != null ? ": " +
message : "" ) );
+ }
+ }
+ }
+
Review comment:
by definition, aren't plugin dependencies transitives (of the plugin)?
shouldn't those warnings finally be limited to current reactor projects AND
only on transitive dependencies (and fully ignore plugins: too late to fix
anything)?
--
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]