【发布时间】:2017-01-01 23:11:42
【问题描述】:
当我使用范围语法时,我似乎无法让 SBT 解决我的依赖关系。
所以
libraryDependencies ++= Seq(
//exact version works i.e. 0.5.3+27
//but what we want to work is [0.5.3,)
//or I've since moved the build number to the 4th component 0.5.3.+
"company" %% "project" % "0.5.3.+",
//...
)
我可以获得准确的版本以正常工作,但没有指定的版本语法 https://ant.apache.org/ivy/history/2.3.0/ivyfile/dependency.html#revision 或http://www.scala-sbt.org/0.13/docs/Library-Management.html 上的示例工作。
我环顾四周,发现这里有一个类似 https://github.com/sbt/sbt/pull/2075 的修复程序,它进入了 sbt 0.13.9,我正在使用 0.13.11。
第一个版本范围是我使用的,因为语义版本建议用于点 10 的元数据,当它不起作用时,库 management docs / Ivy revision docs 说“用 + 结束修订选择最新的子-revision of the dependency module”,所以我删除了 + 以防导致问题,并添加了第四个组件,它只是 GoCD 提供的内部版本号。同样,确切的版本有效,但不能进行子修订。
在 sbt 中,我可以看到两种格式的 URL:
-
https://dl.bintray.com/
<username>/internal-releases/<namespace>/<project-name>_2.11/[revision]/<project-name>_2.11-[revision].pom -
http://dl.bintray.com/
<username>/internal-releases/<namespace>/<project-name>_2.11/[revision]/ivys/ivy.xml
注意这里[revision] 是在打印的URL 中的字面意思。尖括号里的东西是我的替代品。因此我认为issue 2005 是相关的。
我没有 SBT 存储库文件。
所以对于这个问题,我是否在上面做错了什么,如何使用min.minor.patch.build 语法(即0.x.x.+)获得版本范围?
【问题讨论】: