[Maven problem (1)] The local warehouse exists, and there is no import dependency in the maven project

One. Problem scenario

        Import a dependency in the pom, and the dependency has been downloaded from the local maven warehouse, but the corresponding dependency is still not found in the maven project. Check that there is no dependency in the External Library, indicating that Maven did not recognize the dependency at all. That is to say, there is no such dependency in the maven project.

two. Solution try

(一) clean + install + reimport

        In the lifecycle of the project, perform the clean operation first, then perform the install package operation, and finally click the right button of the project to reimport, the problem is not solved.

(Two) local maven warehouse

        Since the maven project does not import this dependency at all, it may be a problem with the local maven warehouse. Check the directory corresponding to the jar package, and there is a _remote.repositories file. After the maven3.x version downloads a resource from a remote warehouse, it will generate the corresponding _remote.repositories file to indicate the source of the resource. If you have this file _remote.repositories, you will not be able to access the local, and you must have talents remotely. OK, otherwise an error will be reported. Therefore, here I deleted the file, reimported the project again, and finally the problem was solved.

Guess you like

Origin blog.csdn.net/Mrwxxxx/article/details/114012061