Re: [sbt] automatically adding release candidates version to library dependencies

72 views
Skip to first unread message

Tony Sloane

unread,
Nov 29, 2012, 6:22:40 PM11/29/12
to simple-b...@googlegroups.com
On 30/11/2012, at 9:49 AM, Simon Schäfer <ma...@antoras.de> wrote:

> In build.sbt I have the following configuration:
>
> scalaVersion := "2.10.0-RC2"
>
> libraryDependencies ++= Seq(
> "org.scalatest" % "scalatest_2.10.0-RC2" % "2.0.M5" % "test"
> )
>
> If I change the dependency of scalatest to
>
> "org.scalatest" %% "scalatest" % "2.0.M5" % "test"
>
> I get the following error:
>
> sbt.ResolveException: unresolved dependency: org.scalatest#scalatest_2.10;2.0.M5: not found
>
> Only the major version is added to the library path. Is it somehow possible to add the RC version, too?

Try adding

scalaBinaryVersion <<= scalaVersion

to your build.sbt. By default for 2.10 and later the binary version is just
the major version whereas before it was the full version. This binary version
setting should not be necessary once 2.10 is released.

cheers,
Tony

Simon Schäfer

unread,
Nov 30, 2012, 10:26:10 AM11/30/12
to simple-b...@googlegroups.com
Hi Tony,

your suggestion works fine, thanks!

Now I only get a warning:

[warn] Binary version (2.10) for dependency org.scala-lang#scala-library;2.10.0-RC2
[warn]     in semantic-bool#semantic-bool_2.10.0-RC2;0.1 differs from Scala binary version in project (2.10.0-RC2).

But because all works fine and we are close to 2.10-final (hopefully) it shouldn't be a problem.

cheers,
Simon
Reply all
Reply to author
Forward
0 new messages