1. Cause
Use maven process, often encounter repeated loading or jar package jar package conflicts issue, but some is due to the maven jar package jar package is automatically loaded with the introduction of other, not to add their own initiative, resulting in jar and add their own version of the package conflict
For chestnut:
Automated testing process, citing testng jar package, while references reportng the jar, but reportng will automatically load-dependent delivery testng jar package, thus leading to testng a jar and add their own version of the conflict
Or use maven maven test will be reported the following error when performing a test install command
[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
2. Solution:
Open the pom.xml file, Dependency Hierarchy (dependency list) to view the jar package dependencies hierarchy
Select the need to remove the jar package right Exclude ..., then save pom.xml, so maven will no longer automatically loaded,
Or may be manually re-added pom <exclusion> version attribute restriction loading
Finally, due to the removal of the jar package, the project may be error
Right maven project selection maven-> update project ...
Or re-add the next testng dependent jar package (add your own jar package also been removed)