SBT无法解析来自其他存储库的依赖关系

时间:2019-03-07 16:29:41

标签: scala sbt

在我的sbt项目中,我有两个内部存储库

resolvers += "Team 1 Releases" at "https://team1repo"
resolvers += "Team 2 Releases" at "https://team2repo"

我正在使用在Team 1 Releases上托管的工件(简称为ArtifactA)。在它的POM(artifactA.pom)文件中,我具有以下父项:

<parent>
  <artifactId>ArtifactB</artifactId>
  <groupId>team2</groupId>
  <version>1.2</version>
</parent>

此ArtifactB托管在team2repo上。当sbt尝试解析ArtifactB时,它尝试在team1repo版本(我的ArtifactA所在的版本)上找到它,但没有尝试在team2repo上找到它,并且出现此错误:

Not Found url=https://team1repo/team2/1.2/artifactb.pom

它应该尝试在以下位置找到它:

url=https://team2repo/team2/1.2/artifactb.pom

我应该怎么做才能解决此问题? Maven可以轻松解决此问题。谢谢。

0 个答案:

没有答案