1

I have a problem where my Scala project will not build in sbt 0.13.1 and Scala 2.10.3 unless I DO NOT try to add the sbteclipse plugin (2.4.0).

I recently switched from Linux Mint 14 Xfce to Fedora 20 Xfce. When I was on Linux Mint 14, I developed a small RESTful service using Scala, Akka, Spray, and Slick, building using sbt. After installing Fedora 20, I installed all the packages necessary to resume work on that REST service. To that end, I ran

yum install -y java
yum install -y scala
yum install -y sbt

This installed OpenJDK 1.7.0_51, Scala 2.10.3, and sbt 0.13.1.

When my plugins.sbt contains the line

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")

running sbt from the command line generates the following error:

sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.10.3: configuration not found in org.scala-lang#scala-library;2.10.3: 'compile'

This is a problem whether the plugins.sbt is located in <projectfolder>/project, or in ~/.sbt/0.13/plugins.

When I comment-out the

// addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.4.0")

line from the plugins.sbt, the build functions normally.

I recreated the problem using a simple test project that just creates a single Scala class with a one-line print statement. The problem continues to occur independently of whatever other plugins, repositories, or library dependencies I define in the plugins.sbt and build.sbt files.

The simple test project is located at testproject on Github

The REST service is located at airport-web on Github

Please note that the REST service has commented-out the addSbtPlugin...sbteclipse line in plugins.sbt.

tuxdna
  • 8,257
  • 4
  • 43
  • 61
crimsonpig
  • 11
  • 2

2 Answers2

1

First of all, you have to be sure witch sbt version you are using, You might have an unexpected version in your path. You can check it with:

sbt sbt-version

One you know what is your version you can select the right version.

  • sbt version -> sbteclipse version
  • 0.13 and up......-> 2.4.0
  • 0.12 ............... -> 2.1.2
  • 0.11.3.............. -> 2.1.1
  • 0.11.2.............. -> 2.0.0
Felix
  • 2,705
  • 1
  • 23
  • 14
  • One thing you can do is to factor out the tooling into ~/.sbt. See one way to do that here: https://github.com/jkleckner/dotsbt/blob/master/README.md – Traveler Oct 07 '14 at 01:54
0

I had same issue and I finished for using last versions of everything:

sbt: 0.13.2 sbteclipse: 2.5.0

I removed all eclipse configuration files for my project (.classpath,.cache,.project,...) I removed all folders generated by previous versions of sbt (target, bin,..) I also removed all java libraries from home ~/.ivy2 to avoid possible conflicts with previously downloaded versions

Then I compiled as : sbt compile Then I add plugins.sbt to the /project folder and call again as: sbt eclipse.

No more errors appeared and I succeeded to import from eclipse. I'm not sure about what was wrong because i didn't find anything on the web. But this worked for me.

Luis
  • 31
  • 1