Skip to content
Josh Suereth edited this page Jun 27, 2013 · 4 revisions

The sbt-native-packager is taking the following approach towards design goals:

  • Create hooks for packaging applications in a native (or universal) fashion using platform-specific tools, such as:
    • Windows Installer XML and MSIs
    • RPMs and YUM
    • Debian package manager
    • generic tar/zip
    • Macintosh App bundles Not implemented
  • Create an abstraction layer where a common set of definitions can be used to define a Java/Scala package, and is mapped into the underlying settings for each tool.
    • Define a "universal" zip/tgz layout
    • Define necessary settings, and generic mappings into MSI/DEB/RPM
  • Create application archetypes which generate default scripts and layouts for projects that match a particular pattern. These can be used to auto-package your project for various environments. Example archetypes include:
    • Server (Play web application, Akka server, etc.). this includes init.d style scripts and/or windows service hooks.
    • Command line utility (sbt, giter8, etc.). This includes launcher scripts, via BAT or BASH.

Generic layout design

The idea here is that we try to generate "universal" mappings, and then canonical ways to expose these into the various operating systems.

Canonical layout

<root>/
  bin/
    <scripts files>
  lib/
    <jar files used>
  conf/
    <configuration files>
  share/
    doc/
      <documentation>
    man/
      <man pages>

Mapping to Linux systems

/opt/<package-name>  --->  <generic root>
/usr/bin/*script* --symlinks--> /opt/<package-name>/bin/*script*
/usr/share/man/man1/*manpage*.1.gz --symlinks--> /opt/<package-name>/share/man/*manpage*.1.gz
/etc/<package-name>/  --symlinks--> /opt/<package-name>/conf/

TODO - What extras are needed to install startup scripts/services?

Mapping to Windows Systems

/opt/<package-name>  --->  PROGRAM_FILES\<package-name> (or user install location)

TODO - What extras are neede dto install startup scripts/services?

Mapping to MacOSX

Potentially, what we do here is just bundle everything in a DMG file that can be loaded.

For the "Application" archetype, we can also provide an app bundle in a DMG file.

Clone this wiki locally