`
zhongzhihua
  • 浏览: 313199 次
  • 来自: ...
社区版块
存档分类
最新评论

idea 仓库地址连接不上问题

    博客分类:
  • idea
 
阅读更多

一。在setting中加入

 <mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
    <mirror>
    <id>alimaven</id>
    <name>aliyun maven</name>
    <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
    <mirrorOf>central</mirrorOf>      
  </mirror>
  </mirrors>

 

也可以在pom.xml 中加入

 

<repositories>
<repository>
   <id>aliyun</id>
   <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>

 

但还是不能连接,报错

[ERROR] Plugin org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its dependencies could not be resolved:Cannot access alimaven (http://maven.aliyun.com/nexus/content/groups/public/) in offline mode and the artifact org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 has not been downloaded from it before. -> [Help 1]

 

 

这个要在idea把offline mode 的勾去掉,如下

 

 

  在 idea - 中 的  maven -的 work offline 的勾去掉

 

 就可以了

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics