user2470042
user2470042

Reputation: 1

SBT 0.7.7 incremental recompilation doesnt work anymore

I'm using sbt 0.7.7 on ubuntu 12.10 to build a Lift app (Lift 2.4/Java 1.6/ Scala 2.7.7)

When I modify a source file, the sbt compiler recompiles all (even independent) files. A debug output of "compile" shows:

[debug] External /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/jce.jar not on classpath.

[debug] External dependency /usr/lib/jvm/java-6-openjdk-amd64/jre/lib/jce.jar not found.

I'm using ~compile and the file is available in the correct path.

Can anybody help me?

** Solution **

Thanks for your help.

It looks like sbt 0.7.7 can't handle symlinks correctly.

I removed the symlink and replaced it by a copy of the original file. This solved the problem.

But we're also updating to sbt 12.3 as soon as possible.

Upvotes: 0

Views: 102

Answers (2)

flavian
flavian

Reputation: 28511

SBT 0.7.7 is severely deprecated. Unless there is any specific reason for which you have to use that version, a 0.12.3 upgrade will make things much easier.

Most frameworks do not legacy support that version of SBT.

Make sure Java is there

Don't use the open source version of the JDK, it is known to cause hassle with Scala at times.

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

Sample config

name := "YourApp"

version := "0.1-SNAPSHOT"

scalaVersion := "2.10.0"

seq(com.github.siasia.WebPlugin.webSettings :_*)

seq(jrebelSettings: _*)

jrebel.webLinks <++= webappResources in Compile

resolvers ++= Seq(
    "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
    "Sonatype releases" at "https://oss.sonatype.org/content/repositories/releases"
)

libraryDependencies ++= {
    val liftVersion = "2.5-RC6"
    Seq(
      "commons-lang" % "commons-lang" % "2.6",
      "net.liftweb" %% "lift-webkit" % liftVersion % "compile",
      "net.liftweb" %% "lift-mongodb-record" % liftVersion % "compile",
      "org.mongodb" %% "casbah" % "2.5.0" % "compile",
      "org.eclipse.jetty"       %  "jetty-webapp"      % "8.1.7.v20120910"       %  "container,compile",
      "org.eclipse.jetty.orbit" %  "javax.servlet"     % "3.0.0.v201112011016"   %  "container,compile" artifacts Artifact("javax.servlet", "jar", "jar"),
      "org.specs2" %% "specs2" % "1.12.3" % "test",
      "ch.qos.logback" % "logback-classic" % "1.0.7" % "compile"
     )
}

classpathTypes ~= (_ + "orbit")

port in container.Configuration := 9100

EclipseKeys.withSource := true

Upvotes: 1

VasiliNovikov
VasiliNovikov

Reputation: 10236

  • I have this file on my ubuntu 13.04
  • are you sure they're independent? Is it checkable in some way?
  • what command do you use for compilation? ~ compile ?
  • I'd suggest to move from the old SBT, old Lift and old Scala anyway. They're far-far away old, new versions have many improvements in performance and allowed techniques. And in the Scala environment it's common to evolutionize quickly, reducing the maintenance period. Check out the most recent official template: https://github.com/lift/lift_25_sbt/

Upvotes: 1

Related Questions