sbt-sources-plugin icon indicating copy to clipboard operation
sbt-sources-plugin copied to clipboard

A simple-build-tool (sbt) plugin/processor for pulling sources for dependencies transitively. Intended for use with sbt 0.7, use update-classifiers in later versions

h2. Provides an sbt action to pull sources for all dependencies transitively

h2. Usage

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.

h3. Usage as processor

  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":http://code.google.com/p/simple-build-tool/wiki/Processors for further details.

h3. Usage as plugin

  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"
}
  1. In your "project definition file":http://code.google.com/p/simple-build-tool/wiki/BuildConfiguration:
import sbt._
class MyProject(info: ProjectInfo) extends DefaultProject(info) with ProjectWithSources {
   // ...
}
  1. Run

Use update-sources task instead of update. update will delete all previously pulled sources

 sbt update-sources

h2. Contributors

Thanks to Mikko Peltonen for his sbt-idea plugin, on which this one is based. See "contributors":http://github.com/mpeltonen/sbt-sources-plugin/contributors

h2. License

Licensed under the New BSD License. See the LICENSE file for details.