导入maven项目无法下载依赖

深碍√TFBOYSˉ_ 2023-07-19 08:27 104阅读 0赞

导入的maven项目是:

https://gitee.com/TicsmycL/nCoV_Crawler2019

公司电脑没有报错,自己电脑导入这个项目报错:

  1. unable to import maven project see logs for details

解决方案:

  1. Helpshow log in explorer》打开idea.log文件,查看日志

最后配置阿里云镜像解决的问题:

  1. <mirrors>
  2. <!-- mirror
  3. | Specifies a repository mirror site to use instead of a given repository. The repository that
  4. | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
  5. | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
  6. |
  7. <mirror>
  8. <id>mirrorId</id>
  9. <mirrorOf>repositoryId</mirrorOf>
  10. <name>Human Readable Name for this Mirror.</name>
  11. <url>http://my.repository.com/repo/path</url>
  12. </mirror>
  13. -->
  14. <!-- 阿里云仓库 -->
  15. <mirror>
  16. <id>alimaven</id>
  17. <mirrorOf>central</mirrorOf>
  18. <name>aliyun maven</name>
  19. <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
  20. </mirror>
  21. <!-- 中央仓库1 -->
  22. <mirror>
  23. <id>repo1</id>
  24. <mirrorOf>central</mirrorOf>
  25. <name>Human Readable Name for this Mirror.</name>
  26. <url>http://repo1.maven.org/maven2/</url>
  27. </mirror>
  28. <!-- 中央仓库2 -->
  29. <mirror>
  30. <id>repo2</id>
  31. <mirrorOf>central</mirrorOf>
  32. <name>Human Readable Name for this Mirror.</name>
  33. <url>http://repo2.maven.org/maven2/</url>
  34. </mirror>
  35. </mirrors>

发表评论

表情:
评论列表 (有 0 条评论,104人围观)

还没有评论,来说两句吧...

相关阅读