Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Greenwich.M1 - Go语言中文社区

Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Greenwich.M1


错误信息:

[ERROR]     Non-resolvable import POM: Failure to find org.springframework.cloud:spring-cloud-dependencies:pom:Greenwich.M1 in http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced @ line 59, column 16 -> [Help 2]

错误原因:

编译时无法从maven的setting.xml中配置的仓库中获取工程所依赖的包

解决办法:

在pom.xml中指定仓库

<repositories>
    <repository>
         <id>spring-milestones</id>
         <name>Spring Milestones</name>
         <url>https://repo.spring.io/milestone</url>
         <snapshots>
             <enabled>false</enabled>
         </snapshots>
    </repository>
</repositories>

 

说明:

<repositories>的配置:

1. 可以在它下面添加多个<repository> ,每个<repository>都有它唯一的ID,一个描述性的name,以及远程仓库的url。

2. <releases><enabled>true</enabled></releases>告诉Maven可以从这个仓库下载releases版本的构件。

3. <snapshots><enabled>false</enabled></snapshots>告诉Maven不要从这个仓库下载snapshot版本的构件。

maven中的仓库分为两种,snapshot快照仓库和release公布仓库。snapshot快照仓库用于保存开发过程中的不稳定版本号,release正式仓库则是用来保存稳定的发行版本号。

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_36833780/article/details/86593660
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。
  • 发表于 2020-02-25 01:07:22
  • 阅读 ( 2297 )
  • 分类:

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢