hammerlab / sbt-parent Edit

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

Version Matrix


SBT plugins reducing boilerplate for a variety of commmon tasks


assembly org.hammerlab.sbt:assembly

  • sbt-assembly wrapper
  • building+publishing thin shaded JARs

base org.hammerlab.sbt:base

  • wraps all modules in this project
  • adds many hammerlab library-aliases default configs

deps org.hammerlab.sbt:deps

Dependency-management DSL and helpers

github org.hammerlab.sbt:github

Fill in scmInfo information, populate other relevant POM fields

js org.hammerlab.sbt:github

Shorthands and dependency-aliases for ScalaJS projects

maven org.hammerlab.sbt:maven

Publish to Maven Central, fill POM fields, add default resolvers

parent org.hammerlab.sbt:parent

  • wrapper for all the plugins here
  • includes aliases for common dependencies

root org.hammerlab.sbt:root

Configure multi-module projects

scala org.hammerlab.sbt:scala

DSL and settings for managing Scala versions

spark org.hammerlab.sbt:spark

Configure projects that use Apache Spark

test org.hammerlab.sbt:test

Use ScalaTest, publish -tests JARs

travis org.hammerlab.sbt:travis

Interface with Coveralls and TravisCI

versions org.hammerlab.sbt:versions

Manage dependency-versions


All modules: parent/base

To depend on all the modules above, add the parent plugin to project/plugins.sbt:

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

The base module also wraps that and adds many hammerlab library-aliases:

addSbtPlugin("org.hammerlab.sbt" % "base" % "4.6.7")

Individual modules

The modules above are also all available individually:

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

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

// etc.

Subprojects' READMEs contain more info about their functionality.


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.6.7")

or create a new project using giter8:

g8 hammerlab/sbt-parent.g8
g8 hammerlab/sbt-base.g8

(These templates live at hammerlab/sbt-parent.g8 / hammerlab/sbt-base.g8)