-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
“NoSuchMethodErrors” due to multiple versions of org.apache.maven:maven-artifact:jar #4533
Comments
@senivam Could you please help me review this issue? Thank you very much. |
Hi @Bing-ok, preferred solution is to upgrade dependency version. However it's possible to upgrade just to the newest versions of all dependencies - 3.6.3 and 3.0.1 respectively. The jersey-doc-modulelist-maven-plugin will work as expected and its version will be 1.0.2. However I'm not sure how do you use it, be case at least my experiments with dependencies and mvn dependency:tree show somehow different output and plugin works in any version without described error. |
You can use command |
yeah, but the main point was that I can not reproduce described error. and if you do not have objections against raising versions to the latest (not just to 2.2 of the maven-dependency-tree) |
PR #4567 was merged, so issue can be closed as fixed. |
Issue description
Hi, there are multiple versions of org.apache.maven:maven-artifact in jersey-2.31\tools\jersey-doc-modulelist-maven-plugin. As shown in the following dependency tree, according to Maven's “nearest wins” strategy, only org.apache.maven:maven-artifact:3.1.1 can be loaded, org.apache.maven:maven-artifact:2.2.0 will be shadowed.
However, one method defined in shadowed version org.apache.maven:maven-artifact:2.2.0 is referenced by client project via org.apache.maven.shared:maven-dependency-tree:2.0, but missing in the actually loaded version org.apache.maven:maven-artifact:3.1.1.
For instance, the following missing method(defined in org.apache.maven:maven-artifact:2.2.0) is actually referenced by jersey-2.31\tools\jersey-doc-modulelist-maven-plugin, which will introduce a runtime error(i.e., "NoSuchMethodErrors") into jersey-2.31\tools\jersey-doc-modulelist-maven-plugin.
Missing method: org.apache.maven.artifact.versioning.ManagedVersionMap: void init (java.util.Map) is invoked by jersey-2.31\tools\jersey-doc-modulelist-maven-plugin via the following path:
Suggested fixing solutions
Thank you very much for your attention.
Best regards,
Dependency tree----
The text was updated successfully, but these errors were encountered: