scala 使用 SBT 重新下载依赖项的 SNAPSHOT 版本
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8224907/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Re-download a SNAPSHOT version of a dependency using SBT
提问by ziggystar
I have the following lines in my build.sbtfile.
我的build.sbt文件中有以下几行。
resolvers += "specs2 snapshot repo" at "http://scala-tools.org/repo-snapshots"
libraryDependencies += "org.specs2" %% "specs2" % "1.7-SNAPSHOT" % "test"
Now if the snapshot has changed (is this reasonable at all, that a maven SNAPSHOT version changes without its version number changing?), how can I tell sbt to download the new version? Using updatedoes nothing.
现在,如果快照已更改(这是否合理,maven SNAPSHOT 版本更改而其版本号不更改?),我如何告诉 sbt 下载新版本?使用update没有任何作用。
回答by David
you should try :
你应该试试 :
libraryDependencies += "org.specs2" %% "specs2" % "1.7-SNAPSHOT" % "test" changing()
changing()will specify that the dependency can change and that it ivy must download it on each update.
changing()将指定依赖项可以更改,并且 ivy 必须在每个update.
Maybe you could also try to define your repository using ivyXML. Something like this :
也许您也可以尝试使用ivyXML. 像这样的事情:
ivyXML :=
<resolvers>
????<ibiblio name="specs2 snapshot repo" changingPattern="*-SNAPSHOT" m2compatible="true" root="http://scala-tools.org/repo-snapshots"/>
</resolvers>
Hope this will help.
希望这会有所帮助。

