Scala Shell Python Ruby HTML Roff
Latest commit e0b0a13 Jan 8, 2018 @atrosinenko atrosinenko committed with muuki88 Change startup script name generation (#1020)
* Change startup script name generation

This commit tries to lower the chance of generation of multiple scripts
with equal names in one archive. Fixes #1016.

Additionally, an attempt was made to improve the word splitting
for the script names, so, for example "UITest" becomes "ui-test"
and not "u-i-test".

* Heuristics for disambiguating names: second try

* Implement simpler disambiguating heuristics

* Fix indentation

* Fix for the case of single main class

* Drop some beautifying logic

* Fix formatting

* Add note to the documentation on script name generation

* Refactor Universal JavaAppPackaging

Factor out common code from `BashStartScriptPlugin` and `BatStartScriptPlugin`

* Show warning when script name collision is detected

* Fix docs formatting

* Fix comments and simplify executable bit logic

README.md

SBT Native Packager

Build Status Build status Codacy Badge Download Join the chat at https://gitter.im/sbt/sbt-native-packager Documentation Status

Native Packager Logo

Goal

SBT native packager lets you build application packages in native formats. It offers different archetypes for common configurations, such as simple Java apps or server applications.

Issues/Discussions

  • Discussion/Questions: If you wish to ask questions about the native packager, we have a mailinglist and we're very active on Stack Overflow. You can either use the sbt tag or the sbt-native-packager tag. They also have far better search support for working around issues.

  • Docs: Our docs are available online. If you'd like to help improve the docs, they're part of this repository in the src/sphinx directory. ScalaDocs are also available.

    The old documentation can be found here

  • Issues/Feature Requests: Finally, any bugs or features you find you need, please report to our issue tracker. Please check the compatibility matrix to see if your system is able to produce the packages you want.

Features

  • Build native packages for different systems
    • Universal zip,tar.gz, xz archives
    • deb and rpm packages for Debian/RHEL based systems
    • dmg for OSX
    • msi for Windows
    • docker images
  • Provide archetypes for common use cases
  • Java8 jdkpackager wrapper
  • Optional JDeb integration for cross-platform Debian builds
  • Optional Spotify docker client integration

Installation

Add the following to your project/plugins.sbt file:

// for autoplugins
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.3.2")

In your build.sbt enable the plugin you want. For example the JavaAppPackaging.

enablePlugins(JavaAppPackaging)

Or if you need a server with autostart support

enablePlugins(JavaServerAppPackaging)

Build

If you have enabled one of the archetypes (app or server), you can build your application with

sbt <config-scope>:packageBin

Examples

# universal zip
sbt universal:packageBin

# debian package
sbt debian:packageBin

# rpm package
sbt rpm:packageBin

# docker image
sbt docker:publishLocal

Read more in the specific format documentation on how to configure and build your package.

Documentation

There's a complete "getting started" guide and more detailed topics available at the sbt-native-packager site.

Please feel free to contribute documentation, or raise issues where you feel it may be lacking.

Contributing

Please read the contributing.md on how to build and test native-packager.

Related SBT Plugins

These are a list of plugins that either use sbt-native-packager, provide additional features or provide a richer API for a single packaging format.

Maintainers

  • Nepomuk Seiler (@muuki88)
  • Alexey Kardapoltsev (@kardapoltsev)
  • Derek Wickern (@dwickern)
  • Felix Satyaputra (@fsat)

Credits