开发者

SBT + Lift - Not being able to build with sbteclipse

I just installed SBT 0.10.1. I'm using Lift 2.4-M3

I can build with Scala 2.9.0-1 but when it tries to search for sbteclipse it just hangs:

[warn]  module not found: com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2
[warn] ==== typesafe-ivy-releases: tried
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/1.2/ivys/ivy.xml
[warn]   -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]   http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/1.2/jars/sbteclipse_2.9.0-1.jar
[warn] ==== local: tried
[warn]   /Users/JP/.ivy2/local/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/1.2/ivys/ivy.xml
[warn]   -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]   /Users/JP/.ivy2/local/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/1.2/jars/sbteclipse_2.9.0-1.jar
[warn] ==== Typesafe Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/0.10.1/1.2/ivys/sbteclipse_2.9.0-1-1.2.xml
[warn]   -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]   http://repo.typesafe.com/typesafe/releases/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/0.10.1/1.2/jars/sbteclipse_2.9.0-1-1.2.jar
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse_2.9.0-1/1.2/sbteclipse_2.9.0-1-1.2.pom
[warn]   -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]   http://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse_2.9.0-1/1.2/sbteclipse_2.9.0-1-1.2.jar
[warn] ==== Scala-Tools Maven2 Repository: tried
[warn]   http://scala-tools.org/repo-releases/com/typesafe/sbteclipse/sbteclipse_2.9.0-1/1.2/sbteclipse_2.9.0-1-1开发者_如何学JAVA.2.pom
[warn]   -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]   http://scala-tools.org/repo-releases/com/typesafe/sbteclipse/sbteclipse_2.9.0-1/1.2/sbteclipse_2.9.0-1-1.2.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[info] 
[warn] :: problems summary ::
[warn] :::: WARNINGS
[warn]      module not found: com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2
[warn]  ==== typesafe-ivy-releases: tried
[warn]    http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/1.2/ivys/ivy.xml
[warn]    -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]    http://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/1.2/jars/sbteclipse_2.9.0-1.jar
[warn]  ==== local: tried
[warn]    /Users/JP/.ivy2/local/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/1.2/ivys/ivy.xml
[warn]    -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]    /Users/JP/.ivy2/local/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/1.2/jars/sbteclipse_2.9.0-1.jar
[warn]  ==== Typesafe Repository: tried
[warn]    http://repo.typesafe.com/typesafe/releases/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/0.10.1/1.2/ivys/sbteclipse_2.9.0-1-1.2.xml
[warn]    -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]    http://repo.typesafe.com/typesafe/releases/com.typesafe.sbteclipse/sbteclipse_2.9.0-1/0.10.1/1.2/jars/sbteclipse_2.9.0-1-1.2.jar
[warn]  ==== public: tried
[warn]    http://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse_2.9.0-1/1.2/sbteclipse_2.9.0-1-1.2.pom
[warn]    -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]    http://repo1.maven.org/maven2/com/typesafe/sbteclipse/sbteclipse_2.9.0-1/1.2/sbteclipse_2.9.0-1-1.2.jar
[warn]  ==== Scala-Tools Maven2 Repository: tried
[warn]    http://scala-tools.org/repo-releases/com/typesafe/sbteclipse/sbteclipse_2.9.0-1/1.2/sbteclipse_2.9.0-1-1.2.pom
[warn]    -- artifact com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2!sbteclipse_2.9.0-1.jar:
[warn]    http://scala-tools.org/repo-releases/com/typesafe/sbteclipse/sbteclipse_2.9.0-1/1.2/sbteclipse_2.9.0-1-1.2.jar
[warn]      ::::::::::::::::::::::::::::::::::::::::::::::
[warn]      ::          UNRESOLVED DEPENDENCIES         ::
[warn]      ::::::::::::::::::::::::::::::::::::::::::::::
[warn]      :: com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2: not found
[warn]      ::::::::::::::::::::::::::::::::::::::::::::::
[info] 
[info] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
[error] {file:/Users/JP/.sbt/plugins/}default-05868e/*:update: sbt.ResolveException: unresolved dependency: com.typesafe.sbteclipse#sbteclipse_2.9.0-1;1.2: not found

The steps I made:

  • Put the sbteclipse build.sbt in ~/.sbt/plugins/
  • Added scalaVersion := "2.9.0-1" to ~/.sbt/plugins/build.sbt because, for some reason, sbt was always building with Scala 2.8.1
  • Copy&Paste Lift scala_29/lift_basic to my project root
  • Added build.sbt to both project root and /project/plugins/ like stated in http://www.assembla.com/spaces/liftweb/wiki/Using_SBT
  • Changed build.properties sbt.version=0.7.7 to sbt.version=0.10.1

Any ideas on how to have this building properly? Do I need to add any code from the https://github.com/typesafehub/sbteclipse ?

Thank you.


Just found the solution.

First things first, like Daniel said, you cannot have scalaVersion in ~/.sbt/plugins/build.sbt Just remove it form there.

Secondly I updated sbteclipse build.sbt from https://github.com/typesafehub/sbteclipse

Thirdly I copied the content from /project/plugins/build.sbt and added it to ~/.sbt/plugins/build.sbt

Finally I cleaned everything from previous builds and ran sbt. It compiled with no errors whatsoever.


You shouldn't have added scalaVersion := "2.9.0-1" to ~/.sbt/plugins/build.sbt. SBT uses Scala 2.8.1 for itself, and that includes any plugins (such as sbteclipse).

You may add that to your project -- as in build.sbt in the root of your project, not project/plugin/build.sbt --, so that it uses Scala 2.9.0-1, but SBT, and sbteclipse, will continue to use Scala 2.8.1.

Again, SBT and its plugins must use SBT's Scala version, which, at the moment, is 2.8.1.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜