使用 SBT 重新下载依赖项的 SNAPSHOT 版本 [英] Re-download a SNAPSHOT version of a dependency using SBT

查看:51
本文介绍了使用 SBT 重新下载依赖项的 SNAPSHOT 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 build.sbt 文件中有以下几行.

I have the following lines in my build.sbt file.

resolvers += "specs2 snapshot repo" at "http://scala-tools.org/repo-snapshots"

libraryDependencies += "org.specs2" %% "specs2" % "1.7-SNAPSHOT" % "test"

现在如果快照发生了变化(这是否合理,maven SNAPSHOT 版本发生变化而其版本号没有变化?),我如何告诉 sbt 下载新版本?使用 update 什么都不做.

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 update does nothing.

推荐答案

你应该试试:

libraryDependencies += "org.specs2" %% "specs2" % "1.7-SNAPSHOT" % "test" changing()

changed() 将指定依赖项可以改变,并且它必须在每次 update 时下载它.

changing() will specify that the dependency can change and that it ivy must download it on each update.

也许您也可以尝试使用 ivyXML 定义您的存储库.像这样:

Maybe you could also try to define your repository using ivyXML. Something like this :

ivyXML :=
  <resolvers>
        <ibiblio name="specs2 snapshot repo" changingPattern="*-SNAPSHOT" m2compatible="true" root="http://scala-tools.org/repo-snapshots"/>
  </resolvers>

希望这会有所帮助.

这篇关于使用 SBT 重新下载依赖项的 SNAPSHOT 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆