1
votes

I'm trying to build the lunatech-securesocial-poc project with scala 2.11.2 and I've updated the scalaVersion in projects/Build.scala. This project depends on securesocial, which I've built locally with 2.11.2 and named its artifact version master-SNAPSHOT. I've updated the dependency in lunatech-securesocial-poc's project to use this version of securesocial. However, SBT (activator) fails to compile because it is looking for ws.securesocial#securesocial_2.10;master-SNAPSHOT. How can I find out what is causing the scala version to be overridden to 2.10. I want 2.11.2. Obviously some dependency is forcing it, but I want to find out what that dependency is, and fix it.

I've tried adding:

dependencyOverrides += "org.scala-lang" % "scala-library" % scalaVersion.value

evictionWarningOptions := EvictionWarningOptions.default.withWarnTransitiveEvictions(true).withWarnDirectEvictions(true).withWarnScalaVersionEviction(true) ivyScala := ivyScala.value map { _.copy(overrideScalaVersion = true) }

to my Build.scala and I'm using SBT version 0.13.7. I don't see why it is so hard for SBT to just abort and tell me that XXX dependency is preventing it from using 2.11.2 and requiring 2.10.

Anyone?

2
What does your Build.scala look like right now?Michael Zajac
Here is my build.scala: pastebin.com/07CJwkKreswenson
Turned out it was a silly mistake in my Build.scala. While I defined scalaVersion in the object (ApplicationBuild) that extends Build, and used it in some dependencies, I failed to include the setting of scalaVersion in the Project settings list.eswenson

2 Answers

4
votes

You can use sbt-dependency-graph plugin to find this out.

1
votes

The issue turned out to be in my Build.scala. While I defined scalaVersion and used it in setting up dependencies, I didn't pass a setting to the Project that overrode the default scalaVersion, which evidently is the one used to build activator (2.10.4). So despite thinking I had set scalaVersion, I hadn't really.