Skip to content
A set of sbt-native-pakager examples
Scala HTML Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
accumulated-main-classes Add Readme to accumulated main classes Aug 27, 2017
application-conf
assembly-one-jar Updating assembly-one-jar Nov 8, 2015
build-scala-simple update custom-package format Nov 8, 2015
custom-package-format
docker Update native-packager and sbt for rpm example Apr 8, 2017
dynamic-mappings
integration-tests
javafx-jdkpackager updating to new jdkpackager May 25, 2015
linux-mappings Even more examples Sep 25, 2014
log4j-conf
multi-module-build
multiple-package-outputs
override-control-scripts
package-mappings
play-2.3 Adding docker example Aug 6, 2014
rpm-sigar
sbt-web-example Updating assembly-one-jar Nov 8, 2015
simple-deb
simple-msi Updating versions and adding windows/rpm examples Jul 13, 2014
simple-rpm Add readme for simple-rpm Apr 8, 2017
startscript-parameters Update versions for startscript example Mar 12, 2016
test-stage-prod-with-scopes
test-stage-prod FIX #14 Use javaOptions to select proper configuration Jan 17, 2019
.gitignore First working example Feb 16, 2014
LICENSE.md Create LICENSE.md Feb 16, 2014
README.md

README.md

Goal

This is a small collection of sbt-native-packager examples. Each example is very small and should be easy to understand. Pick the ones you need and tailor your packaging process.

Not all examples are 100% tested. Just open an issue if something doesn't work

Examples

Currently all examples are tested for Debian only. Feel free to correct and contribute.

Application configuration

Your application has an external configuration, which you want to change and the application should pick up this changes.

Requirements

How it's done

Typesafe config uses the system property config.file to pass in a configuration location. So you don't need to add a folder to the classpath, which could be a potential security risk.

Project

You can find a working example at application-conf

Log4j configuration

This is related to the Application configuration. This time we use log4j.

Requirements

  • Linux OS (debian/rpm)
  • Log4j 2 (works in a similar way with 1.x)

How it's done

Log4j uses the system property log4j.configurationFile to pass in a configuration location. So you don't need to add a folder to the classpath, which could be a potential security risk.

Log4j 2 as also a cool auto reconfigurate feature, which can come in very handy.

Project

You can find a working example at log4j-conf

Custom Startup Parameters

A small example how to configure your startup parameters with SBT Native Packager. You'll see how to add java system properties and application arguments. We also change the -Xmx and -Xms settings.

Requirements

  • Linux OS (debian/rpm)

How it's done

Create a file src/templates/etc-default and fill it with the content you need.

Project

You can find a working example at startscript-parameters

Links

You can’t perform that action at this time.