Java Server Application Archetype¶
Supports only deb and rpm packaging. No support for Windows or macOS
In the Java Application Archetype section we described how to build and customize settings related to an application. The server archetype adds additional features you may need when running your application as a service on a server. SBT Native Packager ships with a set of predefined install and uninstall scripts for various platforms and service managers.
The JavaServerAppPackaging archetype depends on the Java Application Archetype and adds the following features
- daemon user/group support
- default mappings for server applications
/var/log/<pkg>is symlinked from
Everything else works the same way as the Java Application Archetype.
If you want your application to be registered as a service enable a Systemloaders plugin.
Settings & Tasks¶
This is a non extensive list of important settings and tasks this plugin provides. All settings have sensible defaults.
- User to start application daemon
- UID of daemonUser
- Group to place daemonUser to
- GID of daemonGroup
- Shell provided for the daemon user
- Home directory provided for the daemon user
- Filename stdout/stderr of application daemon. Now it’s supported only in SystemV
The java server archetype creates a default package structure with the following access rights. <package> is a
placeholder for your actual application name. By default this is
|/usr/share/<package>||root||755 / (655)||static, non-changeable files|
|/etc/default/<package>||root||644||default config file|
|/etc/<package>||root||644||config folder -> link to /usr/share/<package-name>/conf|
|/var/run/<package>||daemon||644||if the application generates a pid on its own|
|/var/log/<package>||daemon||644||log folder -> symlinked from /usr/share/<package>/log|
If you want to change something in this predefined structure read more about it in the linux section.