Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
823 views
in Technique[技术] by (71.8m points)

scala - Re-download a SNAPSHOT version of a dependency using 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"

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

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>

Hope this will help.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...