sbt plugin to rewrite eclipse classpath of a dependency as a local project
sbt-eclipsedeplocal adds one main task:
.classpathof a given library dependency as a local project
NOTE: requires sbt 1.x
addSbtPlugin("com.github.bdkent" % "sbt-eclipsedeplocal" % "0.1.0")
Let's assume you have a two projects, a library (
awesome-library) and an app (
awesome-app), where the app includes the library.
build.sbt includes it like so:
libraryDependencies += "org.foo" % "awesome-library" % "0.1.0"
and you are actively developing both in Scala IDE, so you have both projects open as
eclipse command, the
/awesome-app project will depend on the published artifact (assumedly somewhere in
$HOME/.ivy2), not the (unrelated from sbt's perspective) Scala IDE project.
This is where the
edlLocalizeDependency task comes in!
The following will rewrite the
/awesome-app to reference the
/awesome-library Scala IDE project instead of the publsihed artifact:
sbt:awesome-app> edlLocalizeDependency org.foo:awesome-library:0.1.0 awesome-library
If the Scala IDE's project name is the same as the name of the artifact (which is the case in the example), you can drop the redundant second parameter:
sbt:awesome-app> edlLocalizeDependency org.foo:awesome-library:0.1.0