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 https://github.com/myname/play-yeoman.git) 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? Thanks!
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("https://github.com/ground5hark/sbt-concat.git#342acc34195438799b8a278fda94b126238aae17")
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.
Follow this steps:
-SNAPSHOTsuffix to the version of the plugin, i.e.
version := "1.0.0-SNAPSHOT"
sbt publishLocalfrom the command line.
- Reference the snapshot version from your