Record a very strange mvn dependency problem

resolution process

  1. First, you need to delete the dependency of a package C under the A module
  2. After deletion, many files were found to be wrong, because many other mvn dependencies could not be imported, including springboot package, redis package, etc.
  3. After adding dependencies that cannot be introduced, it still cannot run, and because the introduction of the package adds a lot of dependencies in the pom file, it is obviously not what you want to see

Later, after executing mvn compile, an error was reported

'dependencies.dependency.version' for xxx:jar is missing. @ xxx:[unknown-version], xxx/pom.xml, line 124, column 21

It was discovered that there is another import of package C under the B module; because of the error here, all the dependencies added after this dependency failed to be imported, but the pom file will not report any errors. Delete it and run There is no problem.

Summary: To delete the mvn dependency, you must delete it completely, because the dependency is likely to exist in different pom files under multiple modules; otherwise, various problems will occur when running through the idea, and the pom file does not report an error, which is deeply hidden. The reason can only be found through the mvn compile command line.

Guess you like

Origin blog.csdn.net/qxconverse/article/details/122815647