You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2022/01/11 15:22:00 UTC

[jira] [Comment Edited] (MNG-7349) Superfluous relocation warning messages

    [ https://issues.apache.org/jira/browse/MNG-7349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17472823#comment-17472823 ] 

Guillaume Nodet edited comment on MNG-7349 at 1/11/22, 3:21 PM:
----------------------------------------------------------------

Displaying unfixable warnings is a definitely bad idea...

One possibility would be to add the relocation message to the {{RelocatedArtifact}} class (which imho makes sense) and move back the display of the message in the {{DefaultProjectDependenciesResolver}} .  We'd have to find the {{RelocatedArtifact}} in the artifacts result list to display the message.




was (Author: gnt):
One possibility would be to add the relocation message to the {{RelocatedArtifact}} class (which imho makes sense) and move back the display of the message in the {{DefaultProjectDependenciesResolver}} .  We'd have to find the {{RelocatedArtifact}} in the artifacts result list to display the message.


> Superfluous relocation warning messages 
> ----------------------------------------
>
>                 Key: MNG-7349
>                 URL: https://issues.apache.org/jira/browse/MNG-7349
>             Project: Maven
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 3.8.3, 3.8.4
>            Reporter: Joep Weijers
>            Assignee: Michael Osipov
>            Priority: Minor
>             Fix For: waiting-for-feedback
>
>
> In the [commit|https://github.com/apache/maven/commit/a1ba33069fad1fb9c6e9cd458ad233ff3a74aadd] that solved MNG-7253, the check for relocations was moved from the DefaultProjectDependenciesResolver to the DefaultArtifactDescriptorReader. This means that the relocation messages are not only shown on project dependencies, but on any artifact that is read.
> This may lead to unfixable WARNINGS in the output if a plugin transitively uses a relocated artifact.
> This can be reproduced by calling {{mvn dependency:tree}} with a simple, empty {{{}pom.xml{}}}. This will give the following warning:
> {code:java}
> [WARNING] The artifact xml-apis:xml-apis:jar:2.0.2 has been relocated to xml-apis:xml-apis:jar:1.0.b2
> {code}
> The default maven-dependency-plugin version is 2.8 and it depends on {{{}org.apache.maven.reporting:maven-reporting-impl:2.0.5{}}}, which depends on {{commons-validator:commons-validator:1.2.0}} which depends on {{{}xml-apis:xml-apis:2.0.2{}}}.
> In this particular case, updating to a recent maven-dependency-plugin version solves the issue. But since the transitive dependencies of plugins are not under the control of the end users, I don't think this warning should be shown.
> *Workaround:*
> Stay on Maven 3.8.2 or disable logging on the DefaultArtifactDescriptorReader:
> {code:java}
> -Dorg.slf4j.simpleLogger.log.org.apache.maven.repository.internal.DefaultArtifactDescriptorReader=error
> {code}
> Although this disables all relocation messages, including the ones you might be interested in.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)