In SBT, how to use addSbtPlugin with a Github URL?

In SBT, how to use addSbtPlugin with a Github URL?

Currently, I used a plugin like this:
addSbtPlugin("com.tuplejump" % "sbt-yeoman" % "0.7.1")

But then, I fork this plugin on github (let's say and make some changes, what would be an easier way to use my forked version of plugin? Do I really have to register this fork on a maven/ivy repository?


Answer 1:

Using SBT 0.13.8, I was able to replace the following line in my ./project/plugins.sbt:

addSbtPlugin("net.ground5hark.sbt" %% "sbt-concat" % "0.1.8")

with the following two lines

lazy val root = (project in file(".")).dependsOn(concatPlugin)

lazy val concatPlugin = uri("")

No other steps were necessary. Also, note that the git URI has a commit hash on the end. This is very useful for ensuring a known-to-work, specific version of the source is used in the project, rather than whatever the latest unknown state of the source is.

Answer 2:

Follow this steps:

  1. Add -SNAPSHOT suffix to the version of the plugin, i.e. version := "1.0.0-SNAPSHOT"
  2. Run sbt publishLocal from the command line.
  3. Reference the snapshot version from your plugins.sbt.