How to use scala 2.10 trunk with sbt 0.11.0? (Unresolved dependencies)

What is the correct way to use sbt with a 2.10 torso? I tried the obvious:

james@James-Moores-iMac :~/workspace/Deleteme3$ cat build.sbt scalaVersion := "2.10.0-SNAPSHOT" 

But it gives:

 james@James-Moores-iMac :~/workspace/Deleteme3$ sbt compile [info] Loading global plugins from /Users/james/.sbt/plugins [info] Set current project to default-ee38f7 (in build file:/Users/james/workspace/Deleteme3/) [info] Updating {file:/Users/james/workspace/Deleteme3/}default-ee38f7... [info] Resolving org.scala-lang#scala-library;2.10.0-SNAPSHOT ... [warn] module not found: org.scala-lang#scala-library;2.10.0-SNAPSHOT [warn] ==== local: tried [warn] /Users/james/.ivy2/local/org.scala-lang/scala-library/2.10.0-SNAPSHOT/ivys/ivy.xml [warn] ==== public: tried [warn] http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.0-SNAPSHOT/scala-library-2.10.0-SNAPSHOT.pom [warn] ==== Scala-Tools Maven2 Repository: tried [warn] http://scala-tools.org/repo-releases/org/scala-lang/scala-library/2.10.0-SNAPSHOT/scala-library-2.10.0-SNAPSHOT.pom [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: org.scala-lang#scala-library;2.10.0-SNAPSHOT: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [error] {file:/Users/james/workspace/Deleteme3/}default-ee38f7/*:update: sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.10.0-SNAPSHOT: not found [error] Total time: 1 s, completed Mar 18, 2012 10:39:29 AM james@James-Moores-iMac :~/workspace/Deleteme3$ 

Failure to try starting a new sbt launcher with -sbt-snapshot:

 james@James-Moores-iMac :/tmp/sfasdf$ sbt -sbt-snapshot compile Detected sbt version 0.12.0-SNAPSHOT Using /Users/james/.sbt/0.12.0-SNAPSHOT as sbt dir, -sbt-dir to override. Getting net.java.dev.jna jna 3.2.3 ... :: retrieving :: org.scala-sbt#boot-jna confs: [default] 1 artifacts copied, 0 already retrieved (838kB/13ms) Getting org.scala-sbt sbt 0.12.0-20120319-052150 ... :: retrieving :: org.scala-sbt#boot-app confs: [default] 38 artifacts copied, 0 already retrieved (7712kB/159ms) Getting Scala 2.9.1 (for sbt)... :: retrieving :: org.scala-sbt#boot-scala confs: [default] 4 artifacts copied, 0 already retrieved (19939kB/426ms) [info] Set current project to wand (in build file:/private/tmp/sfasdf/) Getting Scala 2.10.0-SNAPSHOT ... downloading http://scala-tools.org/repo-snapshots/org/scala-lang/scala-compiler/2.10.0-SNAPSHOT/scala-compiler-2.10.0-20120319.161232-290.jar ... [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.0-SNAPSHOT!scala-compiler.jar (28525ms) downloading http://scala-tools.org/repo-snapshots/org/scala-lang/scala-library/2.10.0-SNAPSHOT/scala-library-2.10.0-20120319.161232-293.jar ... [SUCCESSFUL ] org.scala-lang#scala-library;2.10.0-SNAPSHOT!scala-library.jar (16869ms) downloading http://scala-tools.org/repo-snapshots/org/scala-lang/jline/2.10.0-SNAPSHOT/jline-2.10.0-20120319.161232-290.jar ... [SUCCESSFUL ] org.scala-lang#jline;2.10.0-SNAPSHOT!jline.jar (1674ms) :: retrieving :: org.scala-sbt#boot-scala confs: [default] 4 artifacts copied, 0 already retrieved (21204kB/91ms) [info] Updating {file:/private/tmp/sfasdf/}default-59a990... [info] Resolving org.scala-lang#scala-library;2.10.0-SNAPSHOT ... [warn] module not found: org.scala-lang#scala-library;2.10.0-SNAPSHOT [warn] ==== local: tried [warn] /Users/james/.ivy2/local/org.scala-lang/scala-library/2.10.0-SNAPSHOT/ivys/ivy.xml [warn] ==== public: tried [warn] http://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.0-SNAPSHOT/scala-library-2.10.0-SNAPSHOT.pom [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: UNRESOLVED DEPENDENCIES :: [warn] :::::::::::::::::::::::::::::::::::::::::::::: [warn] :: org.scala-lang#scala-library;2.10.0-SNAPSHOT: not found [warn] :::::::::::::::::::::::::::::::::::::::::::::: [error] {file:/private/tmp/sfasdf/}default-59a990/*:update: sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.10.0-SNAPSHOT: not found [error] Total time: 54 s, completed Mar 20, 2012 7:37:55 AM 
+6
source share
2 answers

You cannot use a trunk with SBT 0.11.0, and you can never do this. Newer versions of SBT (snapshots 0.12) can handle it.

+4
source

Use this version of the actual sbt script: https://raw.github.com/paulp/sbt-extras/master/sbt

Run with

 sbt -sbt-snapshot 

Add this to the build.sbt file:

 scalaVersion := "2.10.0-SNAPSHOT" resolvers += Resolver.sonatypeRepo("snapshots") 

(added as a new answer to combine a couple of answers in one place, but Daniel still answered correctly).

+4
source

Source: https://habr.com/ru/post/911040/


All Articles