hammerlab / sbt-parent

SBT plugins for publishing to Maven Central, shading and managing dependencies, reporting to Coveralls from TravisCI, and more



Maven Central

SBT plugins reducing boilerplate for a variety of commmon tasks:

  • assembly: building+publishing thin shaded JARs
  • deps: dependency-management DSL and helpers
  • maven: publishing to Maven Central, filling POM fields, adding resolvers
  • github: filling in scmInfo information (and populating relevant POM fields)
  • parent: wrapper for all the plugins here, including aliases for common dependencies
  • root: configuring multi-module projects
  • scala: managing/setting Scala versions
  • spark: configuring projects that use Apache Spark
  • test: using ScalaTest, publishing -tests JARs
  • travis: interfacing with Coveralls and TravisCI
  • versions: managing dependency-versions

To depend on all of them, add to project/plugins.sbt:

addSbtPlugin("org.hammerlab.sbt" % "parent" % "4.2.0")

They are also available individually:

// Settings for publishing to Maven Central 
addSbtPlugin("org.hammerlab.sbt" % "maven" % "4.0.0")

// Adding GitHub-repo info
addSbtPlugin("org.hammerlab.sbt" % "github" % "4.1.0")

// etc.

Subprojects' READMEs contain more info about their functionality.

A derivative of parent with hammerlab-specific configs can also be found in the base module.


hammerlab projects demonstrating use of various plugins from this repo :

  • math-utils
    • multi-module project with classpath-dependencies between modules
    • cross-published for Scala 2.11 and 2.12
    • wildcard-imports at sbt console startup
  • io-utils
  • spark-bam
    • multiple modules
    • shading+renaming of dependencies
    • many different dependency-configurations
    • inter-module test-scoped dependencies


Add to project/plugins.sbt of an existing project:

addSbtPlugin("org.hammerlab.sbt" % "parent" % "4.2.0")

or create a new project using giter8:

g8 hammerlab/sbt-parent.g8

(This template lives at hammerlab/sbt-parent.g8)