Skip to content

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

License

Notifications You must be signed in to change notification settings

OlegYch/sbt-sources-plugin

 
 

Repository files navigation

Provides an sbt action to pull sources for all dependencies transitively

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.

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 for further details.

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"
}

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

Contributors

Thanks to Mikko Peltonen for his sbt-idea plugin, on which this one is based.
See contributors

License

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

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 95.3%
  • Shell 4.7%