How to resolve JAR package conflicts in Maven?Because of Maven’s implicit dependency on JARs, it can cause JAR package version conflicts in projects.
Maven comes with two ways:
Path Proximity Principle: Dependency on the path passed to the near priority.
Preference Declare Principle: Dependencies are defined in the POM file. The dependencies declared first prevail.
Manual configuration in two ways:
Method: by excluding rely on exclusion tag
lock version: through dependencyManagement lock version directly.
What is Maven and its life cycle?Maven is a project management tool that manages the entire life cycle of a project and manages the dependent JARs of a project. The life cycle of Maven includes: clean up, compile, test, package, install, and deploy with the following commands: MVN compile Java files into class files and output them to target directory. MVN test runs unit test classes. MVN package deploys include install. MVN deploy include install. And upload the project to the remote repository
Read More:
- How to select the jar package version for Maven package when the jar package versions referenced by multiple modules are inconsistent
- [details] jar conflict resolution in Maven (personal test)
- Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (default) on project
- Tomcat was unable to load Maven’s jar package
- mvn install Error: Failed to read artifact descriptor org.apache.maven.plugins:maven-install-plugin:jar:2
- When Maven hits the jar package, an error is reported when executing install, and the symbol cannot be found in a line
- Maven compilation error: package does not exist jar package does not exist
- The jar package download of Maven project appears (could not transfer artifact. Org mybatis:mybatis )
- Idea Maven project uses package to package and report error (package does not exist)
- Research on Maven management of Java project pom.xml The jar package error is reported, but the project is running normally
- The introduction of third-party jar package in mavn project results in classnotfoundexception
- 解决Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- The import Maven project appears http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Solutions
- [Solved] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test
- Failed to execute goal org.apache.maven . plugins:maven-surefire-plugin :2.12.4:test
- Eclipse Maven package error
- Failed to execute goal in Maven build org.apache.tomcat .maven:
- Maven failed to start component [standard engine [Tomcat] when using tomcat7 Maven plugin plug-in run
- How to Fix Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- “[warning] failed to retrieve plugin descriptor for caused by Maven security agent settings org.apache.maven . plugins:… “