How to quickly find conflicting jar packages

Add a plugin to the pom file

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce</id>
<configuration>
<rules>
<dependencyConvergence/>
</rules>
</configuration>
<goals>
<goal>enforce</goal>
</goals>
</execution>
</executions>
</plugin>

The specific usage of this plugin can be checked on the official website. I just use it to query the conflicting jar package faster, just paste it directly in the pom file.

Running the mvn command validate will print out all conflicting jar packages in the console, and then remove the conflicting jar packages by yourself.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325257549&siteId=291194637