Open dumoulma opened 7 years ago
Exactly same issue here :/
I was using the latest version (1.0.3) of sbt.
Downgrading the sbt.version at project/build.properties
to 0.13.16 fixed the problem for me.
It seems like the Scala used by SBT and the one that we specify at our build.sbt are different things.
I noticed this when using sbt on version 1.0.3 it was using Scala 2.12 do resolve the dependencies, while in my build.sbt I was specifying 2.11.11
Today I've reinstalled sbt, and by default the sbt new scala/scala-seed.g8
command creates a new project with the following:
build.sbt
import Dependencies._
lazy val root = (project in file(".")).
settings(
inThisBuild(List(
organization := "com.example",
scalaVersion := "2.12.4",
version := "0.1.0-SNAPSHOT"
)),
name := "Hello",
libraryDependencies += scalaTest % Test
)
project/build.properties
sbt.version=0.13.16
Then I've ran the command 'sbt' for the first time inside the project folder, and looking at the logs, it appears:
Getting org.scala-sbt sbt 0.13.16 ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.16/jars/sbt.jar ...
[SUCCESSFUL ] org.scala-sbt#sbt;0.13.16!sbt.jar (3491ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/test-agent/0.13.16/jars/test-agent.jar ...
[SUCCESSFUL ] org.scala-sbt#test-agent;0.13.16!test-agent.jar (3344ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/apply-macro/0.13.16/jars/apply-macro.jar ...
[SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.16!apply-macro.jar (3535ms)
[...]
:: retrieving :: org.scala-sbt#boot-app
confs: [default]
49 artifacts copied, 0 already retrieved (17616kB/54ms)
Getting Scala 2.10.6 (for sbt)...
downloading https://repo1.maven.org/maven2/org/scala-lang/jline/2.10.6/jline-2.10.6.jar ...
[SUCCESSFUL ] org.scala-lang#jline;2.10.6!jline.jar (994ms)
downloading https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.4/jansi-1.4.jar ...
[SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (664ms)
:: retrieving :: org.scala-sbt#boot-scala
confs: [default]
5 artifacts copied, 0 already retrieved (24494kB/31ms)
Getting Scala 2.10.6 (for sbt)...
I did not catch the problem early because I've created the project with IntelliJ IDEA, then migrated to the command line. Missed the SBT's install part.
So, hope that this helps out someone else :)
And maybe it should be clear that it's required sbt on version 0.13 to get it working. What do you think?
EDIT 1: With the 'about' command inside sbt:
[info] This is sbt 0.13.16
[info] The current project is {file:/home/wesley/github/projects/mongo-scala-spark/}root 0.1.0-SNAPSHOT
[info] The current project is built against Scala 2.12.4
[info] Available Plugins: sbt.plugins.IvyPlugin, sbt.plugins.JvmPlugin, sbt.plugins.CorePlugin, sbt.plugins.JUnitXmlReportPlugin, sbt.plugins.Giter8TemplatePlugin, sbtsparkpackage.SparkPackagePlugin, sbtassembly.AssemblyPlugin
[info] sbt, sbt plugins, and build definitions are using Scala 2.10.6
>
Hi!
Can't use sbt-spark-package because the plugin can't be found. I saw two other closed issues with similar problem and tried the resolutions there, but it doesn't seem to work.
I defined scalaVersion as 2.11.11 and it's trying to get for scala 2.12
Relevant part of by build.sbt:
relevant part of plugins.sbt