This will create a new sbt project source tree for a project named my-sub-project under the directory named sub-project-dir relative you your projects base directory. From your main build configuration you can use this as a stub and reference it as.

lazy val sub = Project("my-sub-project", file("sub-project-dir"))

Or remove the generated stub build.sbt and just use the generate source tree

Requirements

Simple Build Tool

The burning desire to start your projects quickly

Installation

In most cases a global installation will make the most sense as the target usage for this plugin is the creation of new projects

For sbt 0.12 or lower

For global installation, if you have a ~/.sbt directory created, in a ~/.sbt/plugins/build.sbt file add the following

For local installation, if you have a ~/project directory created, in a ~/project/build.sbt file add the following

Doing this in a global .sbt file under ~/.sbt (e.g. ~/.sbt/np.sbt) will make np's setting available to all of your sbt projects.

For sbt 0.13+

If you don't already have one, create an ~/.sbt/0.13/plugins directory. And inside of it, create an np.sbt ( it doesn't matter what you call it ) file containing the line

addSbtPlugin("me.lessis" % "np" % "0.2.0")

This will make npSettings globally visible to your project definitions.

If you wish to globally mix in npSettings, create a file under ~/.sbt/0.13 called np.sbt ( it doesn't matter what you call this either ) containing the line

seq(npSettings: _*)

Customization

If you have a lot of projects that use the same ivy organization id (your own) or you always start projects with the same version conventions (a SNAPSHOT), you may want to define your own custom global overrides.

To do so, in a ~/.sbt/np.sbt file in sbt 0.12, or ~/.sbt/0.13/np.sbt file in 0.13, add the following.