How to resolve the Maven Jar bundle Dependency version conflict (Dependency collision)

Source: Internet
Author: User

Because many jar packages are interdependent, it is easy to generate versioning problems when using MAVEN to build a project.


Problem: Compile compilation passed, but test tests or install after the program error

Tip method is not found, by looking at the class that throws the exception, you can see that the referenced class does not have this method, because when it is run, a different version of the jar package is referenced.



Workaround:


Step 1: Open Pom.xml through MyEclipse, open dependency hierarchy, find the corresponding package for the error class

It was found that some relied on beans 3.2.0 and some relied on beans 3.2.8.




Step 2: Right button > Exclude Maven artifact


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.