Reputation: 482
I tried to compile a scala project with sbt. I downloaded the scala binary (2.11.2). The project can be cloned on github.
git clone git://github.com/scalation/scalation.git scalation
I moved the entire scala binary to the project root and modified the Build.sbt and here's my change.
name := "scalation"
scalaVersion := "2.11.2"
scalaHome := Some(file("scala-2.11.2"))
libraryDependencies += "org.scala-lang" % "scala-swing" % "2.11-1.0.1"
I can see the project is being compiled with the correct binary but after a while it gives me the following error:
module not found: org.scala-lang.modules#scala-swing;2.11-1.0.1
And the version of the scala swing
~/scalation$ ls scala-2.11.2/lib/
scala-swing_2.11-1.0.1.jar
I think there's something wrong with my libraryDependencies.
Let me explain why I made the modification in build.sbt
.
When I first cloned the project, I followed the instruction and do ./sbt compile
It gives me
/home/pierre/scalation/src/scalation/process/Model.scala:11: not found: object actors
[error] import actors.Actor
Then I realized it cannot find my scala. So I added this line and dragged my scala binary to this project because it's more convenient.
scalaHome := Some(file("scala-2.11.2"))
And when I do ./sbt compile again, it goes through the previous error but gives me another one
[error] (*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-swing;2.11.2: not found
[error] Total time: 3 s, completed Aug 30, 2014 6:04:36 PM
[Updated Answer: INSTALLATION GUIDE] In case someone happens to be interested in this project, the correct installation is here: http://cobweb.cs.uga.edu/~jam/scalation_1.0/INSTALL_SBT.html
The one on github is broken.
Upvotes: 1
Views: 1069
Reputation: 36
Not sure what you are trying to do with those modification, and I never thought you need to copy the whole scala binaries and sbt binaries into your project... but have you at least checked whether that version of scala-swing does exist?
Should it actually be
libraryDependencies += "org.scala-lang.modules" % "scala-swing_2.11" % "1.0.1"
or even
libraryDependencies += "org.scala-lang.modules" %% "scala-swing" % "1.0.1"
?
Upvotes: 1