diff --git a/README.md b/README.md index 24b2ca954..436ad9268 100644 --- a/README.md +++ b/README.md @@ -23,35 +23,55 @@ join the discussion in [#498](https://github.com/sbt/sbt-native-packager/issues/ we're very active on [Stack Overflow](http://stackoverflow.com/questions/tagged/sbt). 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](http://scala-sbt.org/sbt-native-packager). If you'd like to help improve the docs, they're part of this + [Our docs are available online](http://scala-sbt.org/sbt-native-packager). If you'd like to help improve the docs, they're part of this repository in the `src/sphinx` directory. [ScalaDocs](http://www.scala-sbt.org/sbt-native-packager/latest/api/#package) are also available. * **Issues/Feature Requests**: Finally, any bugs or features you find you need, please report to our [issue tracker](https://github.com/sbt/sbt-native-packager/issues/new). Please check the [compatibility matrix](https://github.com/sbt/sbt-native-packager/wiki/Tested-On) to see if your system is able to produce the packages you want. + +## Features -## Installation ## +* 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 +** Java application + +## Installation Add the following to your `project/plugins.sbt` file: ```scala -// for sbt 0.12.x and scala 2.9.x -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.7.7-RC1") +// for autoplugins +addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0") +``` -// for sbt 0.13.x and scala 2.10.x -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.8.0") +In your `build.sbt` enable the plugin you want. For example the +`JavaAppPackaging`. -// for autoplugins -addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.0.0-RC1") +```scala +enablePlugins(JavaAppPackaging) ``` -For the native packager keys add this to your `build.sbt` + +For non-autoplugins use the `0.8.0` version. ```scala -import NativePackagerKeys._ +addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "0.8.0") ``` +For the native packager keys add this to your `build.sbt` if you use the a version +before `1.0.0` + +```scala +import NativePackagerKeys._ +``` + ## Experimental systemd bootsystem support ## @@ -64,25 +84,6 @@ To enable this feature follow [My First Packaged Server Project guide](http://ww Any help on testing and improving this feature is appreciated so feel free to report bugs or making PR. -## Experimental Docker support ## - -Native packager now provides experimental `Docker` images. Docker version `1.3` or higher is required. -To enable this feature follow [Docker Plugin guide](http://www.scala-sbt.org/sbt-native-packager/formats/docker.html) and use one of the provided Docker tasks for generating images. - -To publish the image, ``dockerRepository`` should be set. - -As with the `systemd` support, help with testing and improvements is appreciated. - -## Experimental JDeb support ## - -If don't run a linux or mac system with ``dpkg`` installed, you can configure the -debian packaging be done by [jdeb](https://github.com/tcurdt/jdeb). To enable this just set another packaging -implementation in your `build.sbt` - -```scala -packageBin in Debian <<= debianJDebPackaging in Debian -``` - ## Experimental Native Packages via `javapackager` @@ -110,5 +111,6 @@ Please feel free to [contribute documentation](https://github.com/sbt/sbt-native - [sbt-assembly](https://github.com/sbt/sbt-assembly) - [sbt-packager](https://github.com/en-japan/sbt-packer) - [sbt-docker](https://github.com/marcuslonnberg/sbt-docker) +- [sbt-bundle](https://github.com/sbt/sbt-bundle) - [sbt-typesafe-conductr](https://github.com/sbt/sbt-typesafe-conductr) - [sbt-newrelic](https://github.com/gilt/sbt-newrelic) diff --git a/src/main/resources/com/typesafe/sbt/packager/archetypes/akka-bash-template b/src/main/resources/com/typesafe/sbt/packager/archetypes/akka-bash-template index 98c4e5c35..205c45395 100644 --- a/src/main/resources/com/typesafe/sbt/packager/archetypes/akka-bash-template +++ b/src/main/resources/com/typesafe/sbt/packager/archetypes/akka-bash-template @@ -1,5 +1,7 @@ #!/usr/bin/env bash +echo "!!!! Akka Microkernel will be deprecated. Use JavaAppPackaging instead !!!!" + declare AKKA_HOME="$(cd "$(cd "$(dirname "$0")"; pwd -P)"/..; pwd)" declare -r app_home="$0" declare -r lib_dir="${AKKA_HOME}/lib" diff --git a/src/main/scala/com/typesafe/sbt/packager/archetypes/AkkaApp.scala b/src/main/scala/com/typesafe/sbt/packager/archetypes/AkkaApp.scala index 0578263ad..49b5b9085 100644 --- a/src/main/scala/com/typesafe/sbt/packager/archetypes/AkkaApp.scala +++ b/src/main/scala/com/typesafe/sbt/packager/archetypes/AkkaApp.scala @@ -9,6 +9,10 @@ import packager.Keys.{ executableScriptName } import SbtNativePackager.Universal /** + * == Deprecated == + * + * Use `JavaAppPackaging` instead. Akka Microkernel will be removed soon. + * * Provides a new default script for akka-micro-kernel applications. * This plugin requires the [[com.typesafe.sbt.packager.archetypes.JavaAppPackaging]], * which will be automatically enabled. @@ -24,6 +28,7 @@ import SbtNativePackager.Universal * * */ +@deprecated("Use JavaAppPackaging instead", "1.0.0") object AkkaAppPackaging extends AutoPlugin with JavaAppStartScript { /** diff --git a/src/sphinx/archetypes/akka_app/index.rst b/src/sphinx/archetypes/akka_app/index.rst index 3a1d1b4e9..2fb5c2029 100644 --- a/src/sphinx/archetypes/akka_app/index.rst +++ b/src/sphinx/archetypes/akka_app/index.rst @@ -1,2 +1,10 @@ Akka Microkernel ################ + +.. raw:: html + + \ No newline at end of file diff --git a/src/sphinx/archetypes/index.rst b/src/sphinx/archetypes/index.rst index 81b6d3914..aecabe2b3 100644 --- a/src/sphinx/archetypes/index.rst +++ b/src/sphinx/archetypes/index.rst @@ -102,6 +102,14 @@ application archetype. The primary differences are: Akka Microkernel Application ---------------------------- +.. raw:: html + + + An Akka microkernel application is similar to a Java Command Line application. Instead of running the classic ``mainClass``, an Akka microkernel application instantiates and runs a subclass of `Bootable `_ . A minimal example diff --git a/src/sphinx/formats/docker.rst b/src/sphinx/formats/docker.rst index f44a3f7f9..e17c9cd85 100644 --- a/src/sphinx/formats/docker.rst +++ b/src/sphinx/formats/docker.rst @@ -189,7 +189,7 @@ In your sbt console type Remove Commands -=============== +~~~~~~~~~~~~~~~ SBT Native Packager added some commands you may not need. For example the chowning of a exposed volume. @@ -212,7 +212,7 @@ the chowning of a exposed volume. Add Commands -============ +~~~~~~~~~~~~ Adding commands is as straightforward as adding anything in a list. @@ -233,7 +233,7 @@ Adding commands is as straightforward as adding anything in a list. Write from Scratch -================== +~~~~~~~~~~~~~~~~~~ You can simply wipe out all docker commands with diff --git a/src/sphinx/formats/jdkpackager.rst b/src/sphinx/formats/jdkpackager.rst index b2cbf643d..4d4cb3ea8 100644 --- a/src/sphinx/formats/jdkpackager.rst +++ b/src/sphinx/formats/jdkpackager.rst @@ -94,7 +94,7 @@ Settings JVM Options ----------- -Relevant JVM settings specified in the ``src/universal/conf/jvmopts`` file are processed and added to the `javapackager` call. See :doc:`Customize Java Applications` for details. +Relevant JVM settings specified in the ``src/universal/conf/application.ini`` file are processed and added to the `javapackager` call. See :doc:`Customize Java Applications` for details. Example diff --git a/src/sphinx/gettingstarted.rst b/src/sphinx/gettingstarted.rst index 0cbfd45c4..952d33e3f 100644 --- a/src/sphinx/gettingstarted.rst +++ b/src/sphinx/gettingstarted.rst @@ -71,51 +71,64 @@ Packaging Formats

*.deb

Packaging format for Debian based systems like Ubuntu

debian:packageBin
- Debian Plugin » + Debian Plugin » -
+

*.rpm

Packaging format for Redhat based systems like RHEL or CentOS.

rpm:packageBin
- Rpm Plugin » + Rpm Plugin »
-
+

*.msi

Packaging format for windows systems.

windows:packageBin
- Windows Plugin » + Windows Plugin »
+
+
+ +

*.dmg

Packaging format for osx based systems.

universal:packageOsxDmg
- Universal Plugin » + Universal Plugin »
-
-
-
+

docker

Package your application in a docker container.

docker:publishLocal
- Docker Plugin » + Docker Plugin »
-
+

*.zip

Packaging format for all systems supporting zip.

universal:packageBin
- Universal Plugin » + Universal Plugin »
+
+
+ + +

*.tar

Packaging format for all systems supporting tar.

universal:packageZipTarball
- Universal Plugin » + Universal Plugin »
-
+

*.xz

Packaging format for all systems supporting xz.

universal:packageXzTarball
- Universal Plugin » + Universal Plugin » +
+
+

jdkpackager

+

Oracle javapackager create packages for your running platform.

+
jdkPackager:packageBinl
+ JDK Packager Plugin »
@@ -129,24 +142,17 @@ Archetypes
-
+

Java Application

Creates a standalone package with an executable bash/bat script.
 

enablePlugins(JavaAppPackaging)
- Learn more » + Learn more »
-
+

Java Server

Creates a standalone package with an executable bash/bat script and additional configuration and autostart.

enablePlugins(JavaServerAppPackaging)
- Learn more » -
-
-

Akka Microkernel

-

Like a the Java Application archetype, but instantiates and runs a subclass of - Bootable
 

-
enablePlugins(AkkaAppPackaging)
- Learn more » + Learn more »
@@ -155,6 +161,10 @@ Archetypes Sitemap ======= +.. raw:: html + +
+ .. toctree:: :maxdepth: 2