These are the steps I've followed:
- I have forked a 3rd party plugin.
- I have modified it, and run
sbt publishLocal
successfully. In order to test it, in the
plugins.sbt
file of a project, I've changedaddSbtPlugin("company" % "some-plugin" % "0.6.5")
to this:lazy val root = project.in( file(".") ).dependsOn(somePlugin)
lazy val somePlugin = project.in(file(System.getProperty("user.home")+"/customPath/"))
but SBT
cannot compile the plugin in this way, because it doesn't find the used plugins of the plugin, even though I've been able to .
I've tried also to reference ~/.sbt/local/....
, i.e., the directory where publishLocal
has placed the compiled plugin, but no success. I don't know what do I have to reference exactly (the folder, the generated .jar
, the ivy.xml
file, ...).
Questions:
- What is the best way of using a locally built plugin?.
- Why does it compile alone, but doesn't when embedded in my project?.
Notes:
- This question is closely related to this one: In sbt, how do you add a plugin that's in the local filesystem?
- I'm using SBT 0.13.7.