maven以配置edas私有仓库
<repository>
<id>csbi-public</id>
<name>csbi-public</name>
<url>http://xa.sinowits.cn:60040/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
pom.xml依赖
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hsf</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-pandora</artifactId>
<version>1.3</version>
</dependency>
拉取依赖报错
Failure to find com.taobao.pandora:taobao-hsf.sar:pom:dev-SNAPSHOT
项目使用spring-cloud Finchley.SR4
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
根据你的描述,你正在尝试通过Maven配置阿里云EDAS的私有仓库来拉取依赖,并且遇到了特定依赖无法找到的问题。这里有几个可能的原因和解决步骤:
检查私有仓库配置: 确保你在settings.xml
中正确配置了EDAS私有仓库的信息。你已经提供了仓库地址http://xa.sinowits.cn:60040/repository/maven-public/
,但请确认以下几点:
mirrorOf
设置是否正确指向了所有远程仓库或特定的仓库ID?依赖版本问题: 你提到的依赖com.taobao.pandora:taobao-hsf.sar:pom:dev-SNAPSHOT
是一个快照版本。对于快照版本,确保你的Maven配置允许下载快照,并且EDAS私有仓库确实包含了这个快照版本。在你的settings.xml
里应该有如下配置开启快照:
<profiles>
<profile>
<id>allow-snapshots</id>
<activation><activeByDefault>true</activeByDefault></activation>
<repositories>
<repository>
<id>central</id>
<url>http://xa.sinowits.cn:60040/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://xa.sinowits.cn:60040/repository/maven-public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
仓库同步问题: 即便配置正确,如果EDAS私有仓库没有同步到最新的快照版本,你也无法下载到。这可能需要联系仓库管理员确认是否有同步机制,或者直接询问该依赖是否存在于仓库中。
替代方案: 如果上述方法都无法解决问题,考虑以下几个替代方案:
最后,由于你提到了使用Spring Cloud Finchley.SR4,确保所有依赖与该版本兼容,有时候依赖版本不匹配也会导致构建失败。