/sbt.g8

giter8 template I use as the starting point for my Scala projects

Primary LanguageShell

giter8 template for projects using GitHub

Template features

  • Integration with your GitHub repo and account.
  • Release section in generated build.sbt complies with Sonatype policies for Maven Central Syncing.
  • sbt-assembly plugin integrated, for the creation of a single executable jar of your project.
  • Informative README.md automatically generated.
  • Reasonable scalac and javac options chosen.
  • Optional settings provided commented out in generated build.sbt.
  • sbt-release plugin integrated, for tagging and publishing releases

Use this template

$ g8 pkaeding/sbt
$ cd <name-of-app>
$ ./sbt
> run

Modify this template

  • Install sbt, version 0.12.0 or higher.
  • Fork pkaeding/sbt.g8 on GitHub to your account. Let's assume your account is "foo".
  • Clone it.
$ git clone git@github.com:foo/sbt.g8.git
  • Now make your desired changes.
  • Do a local deploy of your modified template and try it out.
$ cd sbt.g8
$ rm -rf target
$ sbt
> g8-test # must result in SUCCESS
> exit
$ cd target/sbt-test/default-*/scripted
$ java -jar target/*-assembly-*.jar # must print "hello sbt.g8"
  • If you like your new template, push it to GitHub.
$ cd sbt.g8
$ git push
  • You can now access your modified template using g8.
$ cd
$ g8 foo/sbt
  • If you'd like to share your changes, send a pull request.