slachiewicz opened a new issue, #313: URL: https://github.com/apache/maven-dependency-analyzer/issues/313
When a class exists in more than one artifact on the classpath, `DefaultProjectDependencyAnalyzer.buildClassToArtifactMap` credits whichever artifact comes first (`putIfAbsent`). If that is not the declared one, the declared artifact is reported as "Unused declared" and the other jar as "Used undeclared", although the project declares a jar that provides the class. Seen in the Maven estate with `plexus-xml` 3.0.x against `plexus-utils` 3.6.x (`Xpp3Dom`), the two `plexus-sec-dispatcher` artifacts (`org.sonatype.plexus` and `org.codehaus.plexus`), and the Bouncy Castle `jdk15on`/`jdk18on` jars. Expected: when a referenced class is provided by a declared artifact, credit that artifact. Related: #280. -- 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]
