Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Add setting to always use absolute paths for library dependencies #79

jorgeortiz85 opened this Issue · 6 comments

3 participants


I have a somewhat complicated sbt setup:

My eclipse workspace is ~/Code
My sbt base directory is ~/Code/foursquare/web
That has several sub projects in ~/Code/foursquare/web/batch, ~/Code/foursquare/web/core, etc
My binary dependencies are fetched to ~/Code/foursquare/web/lib_managed

My generated .classpath files (e.g., ~/Code/foursquare/web/batch/.classpath) have entries that look like:

<classpathentry path="../lib_managed/jars/junit-3.8.1.jar" kind="lib"></classpathentry>

The path is correct, but Eclipse doesn't seem to like the ".." part. The jars are marked as not found in the Eclipse build path configuration. I've tried every combination imaginable (relative to the workspace directory, relative to the base directory, ./../, etc) and nothing other than absolute path seems to work.

@jorgeortiz85 jorgeortiz85 referenced this issue from a commit in foursquare/sbteclipse
@jorgeortiz85 jorgeortiz85 Always use absolute paths as work around for #79 b0847d2

Hi Jorge,

On the long run I could add a setting to use absolute paths. But could you please also try to use separate directories for the Eclipse workspace and the sbt projects? I can remember that there were several Eclipse issues back some day related to using the same directories.



What do you mean? My workspace and sbt project are already separate directories. Or you mean not in the same path?


The latter.


No luck :(


I could reproduce the issue (indeed an Eclipse issue), but I could also resolve it by using a different workspace directory. So maybe you should once again try your luck, at least try it with my setup. It will fail, if you create your workspace in the below ws, but if you create it in a directory which is not a super directory of this ws, it should work.

/Users/heiko/tmp/ws workspace directory
/Users/heiko/tmp/ws/test build (root project) directory
/Users/heiko/tmp/ws/test/suba subproject directory
/Users/heiko/tmp/ws/test/subb subproject directory


import sbt._
import sbt.Keys._

object Build extends Build {

  lazy val root = Project(
    aggregate = Seq(suba, subb)

  lazy val suba = Project(
    settings = Project.defaultSettings ++ Seq(
      libraryDependencies ++= Seq(
        "biz.aQute" % "bndlib" % "1.50.0"
      retrieveManaged := true

  lazy val subb = Project(
    dependencies = Seq(suba)

I have similar problem with the snapshot-version. Now I choose github/myProjects github/ws/.metadata and it works.

@hseeberger hseeberger closed this in c3aa1ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.