The automatic import of maven project dependencies failed (pom.xml file became popular), solution - manual import


idea error message : Dependency 'xxx' not found

Solution : It can be solved by changing the image configuration of the warehouse, but generally when configuring Maven, it is set to the Alibaba Cloud warehouse image. If it is changed to another one, the connection may not be connected.

Notes on manual import :包/目录的层级关系


1. Go to the maven warehouse official website [mvnrepository] and search to find the introduced dependencies.

  • Official website: https://mvnrepository.com/

  • Example: Search mockito-all and find the hierarchical relationship org.mockito>> mockito-all

  • Find the dependencies of the corresponding version:

  • Download a file with all information about dependencies:

  • Download details:

  • Complete the hierarchical relationship directory and place the downloaded dependency information files in the directory of the corresponding version:

  • final effect:

  • Refresh maven in idea and it will take effect




If this article is helpful to you, please remember to give Yile a like, thank you!

Guess you like

Origin blog.csdn.net/weixin_45630258/article/details/128379302