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/10/20 08:11:03 UTC

[jira] [Updated] (MNG-7349) Limit relocation warning message to direct dependencies only

     [ https://issues.apache.org/jira/browse/MNG-7349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated MNG-7349:
---------------------------------
    Fix Version/s: 4.0.0-alpha-2

> Limit relocation warning message to direct dependencies only
> ------------------------------------------------------------
>
>                 Key: MNG-7349
>                 URL: https://issues.apache.org/jira/browse/MNG-7349
>             Project: Maven
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 3.8.3, 3.8.4
>            Reporter: Joep Weijers
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: 3.8.5, 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>
> 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.10#820010)