0

I'm using SBT 0.13.7 to build a Scala 2.10.4 project. I'm using Artifactory basically as a local offline cache (although this problem is present when I try to populate it, online).

I've included the scalajs-react library with

libraryDependencies += "com.github.japgolly.scalajs-react" %%% "core" % "0.11.2"

but I get

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.github.japgolly.scalajs-react#core_sjs0.6_2.10;0.11.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::

I have Artifactory pointing at

http://central.maven.org/maven2/

among other repos, but it looks like this has 0.6_2.11

http://central.maven.org/maven2/com/github/japgolly/scalajs-react/core_sjs0.6_2.11/

How has SBT determined that it needs 0.6_2.10, and can I influence it in some way?

EXTRA:

Looks like I can point it in the right direction with

libraryDependencies += "com.github.japgolly.scalajs-react" %%% "core" % "0.11.2" from "http://central.maven.org/maven2/com/github/japgolly/scalajs-react/core_sjs0.6_2.11/0.11.2/core_sjs0.6_2.11-0.11.2.jar"

but that seems to completely bypass Artifactory.

Tim Barrass
  • 4,813
  • 2
  • 29
  • 55
  • 1
    You cannot include a 2.11 dependency in a 2.10 project. You need to move to 2.11 first. – kiritsuku Oct 19 '16 at 20:42
  • And suddenly the _2.11 makes sense. I can see that there's a core_sjs0.5_2.10 available at that maven repo -- is there a reason it's going for 0.6_2.11 rather than 0.5_2.10? – Tim Barrass Oct 19 '16 at 21:17
  • Ah -- moving to 2.11 and using libraryDependencies += "com.github.japgolly.scalajs-react" % "core_sjs0.6_2.11" % "0.11.2" ? – Tim Barrass Oct 19 '16 at 21:27
  • The `_sjs0.6_2.11` prefix is automatically added by sbt when you use `%%%` instead of `%`. It reads your configured Scala.js and Scala version. – kiritsuku Oct 20 '16 at 10:27
  • Great, thanks -- I'd be happy to accept that as an answer .. – Tim Barrass Oct 20 '16 at 12:05

1 Answers1

1

You can use scala-js-react 0.5.4 with Scala.js 0.5.X. It's the last version to support 2.10 (see maven central).

Guillaume Massé
  • 8,004
  • 8
  • 44
  • 57