我正在尝试从自定义远程存储库设置对SNAPSHOT jar工件的依赖关系,但似乎SBT正在从错误的快照读取。我的build.sbt中的相关行如下:
resolvers += repoName at domainUrl
credentials += Credentials(pathToCredentials)
libraryDependencies += myGroupId % myArtifactId % myVersion-SNAPSHOT
当我尝试编译时,出现以下错误:
[error] sbt.librarymanagement.ResolveException: unresolved dependency:
myGroupId#myArtifactId;myVersion-SNAPSHOT:
repoName: unable to get resource for myGroupId#myArtifactId; myVersion-SNAPSHOT: res=domainUrl/groupIdArtifactIdPath/myVersion-SNAPSHOT/myArtifactId-myVersion-SNAPSHOT.pom:
java.net.ProtocolException: Too many follow-up requests: 21
从错误消息中,我看到SBT正在寻找文件:
myArtifactId-myVersion-SNAPSHOT.pom
在maven-metadata.xml文件中指定了应查找的实际快照。实际上,通过手动检查远程存储库,正确的路径应为:
domainUrl/groupIdArtifactIdPath/myVersion-SNAPSHOT/myArtifactId-myVersion-someTimestampBuildNumberThingy.pom
如何让SBT在远程存储库的maven-metadata.xml文件中查找正确的引用,而不是使用默认格式并查找名称为SNAPSHOT的文件?