Java Application Archetype

Application packaging focuses on how your application is launched (via a bash or bat script), how dependencies are managed and how configuration and other auxiliary files are included in the final distributable. The JavaAppPackaging archetype provides a default application structure and executable scripts to launch your application.

Additionally there is Server Packaging which provides platform-specific functionality for installing your application in server environments. You can customize specific debian and rpm packaging for a variety of platforms and init service loaders including Upstart, System V and SystemD (experimental).

Features

The JavaAppPackaging archetype contains the following features.

  • Default application mappings (no fat jar)
  • Executable bash/bat script

Usage

Version 1.0 or higher with sbt 0.13.5 and and higher

enablePlugins(JavaAppPackaging)

Version 0.8 or lower

import com.typesafe.sbt.SbtNativePackager._
import NativePackagerKeys._

packageArchetype.java_application

Customize

You can customize the bash/bat scripts in different ways. This is explained in the Customize section. The application structure is customizable via the standard mappings, which is described in the Universal Plugin Section.