Tool can be used either as sbt plugin or sbt processor
Usage as plugin requires modification of your project descriptor, whereas usage as processor is non-intrusive and requires only few commands on the sbt console. Instructions for both usage scenarios below.
1. Start sbt console (for any project)
2. Enter the following sbt console commands (* is part of sbt processor command syntax):
> *olegychRepo at https://bitbucket.org/olegych/mvn/raw/default > *sources is com.olegych sbt-sources-processor 0.2.0 ... > sources ...
You can also replace the default update task by issuing the following command (probably not the best idea for now):
> *update is com.olegych sbt-sources-processor 0.2.0
To revert to default ‘update’ use this command:
> *remove update
Check out sbt’s processor documentation for further details.
1. In your project/plugins/Plugins.scala:
import sbt._ class Plugins(info: ProjectInfo) extends PluginDefinition(info) { val olegychRepo = "olegychRepo" at "https://bitbucket.org/olegych/mvn/raw/default" val sbtSourcesPlugin = "com.olegych" % "sbt-sources-plugin" % "0.2.0" }
2. In your project definition file:
import sbt._ class MyProject(info: ProjectInfo) extends DefaultProject(info) with ProjectWithSources { // ... }
3. Run
Use update-sources task instead of update. update will delete all previously pulled sources
sbt update-sources
Thanks to Mikko Peltonen for his sbt-idea plugin, on which this one is based.
See contributors
Licensed under the New BSD License. See the LICENSE file for details.