Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release preparations #550

Merged
merged 1 commit into from
Apr 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 31 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##

Expand All @@ -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`

Expand Down Expand Up @@ -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)
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -24,6 +28,7 @@ import SbtNativePackager.Universal
*
*
*/
@deprecated("Use JavaAppPackaging instead", "1.0.0")
object AkkaAppPackaging extends AutoPlugin with JavaAppStartScript {

/**
Expand Down
8 changes: 8 additions & 0 deletions src/sphinx/archetypes/akka_app/index.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
Akka Microkernel
################

.. raw:: html

<div class="alert alert-danger" role="alert">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
The <em>Akka Microkernel Archetype</em> will be deprecated in favor of the more
general and better maintained <em>Java App Archetype</em>
</div>
8 changes: 8 additions & 0 deletions src/sphinx/archetypes/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ application archetype. The primary differences are:
Akka Microkernel Application
----------------------------

.. raw:: html

<div class="alert alert-danger" role="alert">
<span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span>
The <em>Akka Microkernel Archetype</em> will be deprecated in favor of the more
general and better maintained <em>Java App Archetype</em>
</div>

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 <https://github.com/akka/akka/blob/master/akka-kernel/src/main/scala/akka/kernel/Main.scala>`_ . A minimal example
Expand Down
6 changes: 3 additions & 3 deletions src/sphinx/formats/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -212,7 +212,7 @@ the chowning of a exposed volume.


Add Commands
============
~~~~~~~~~~~~

Adding commands is as straightforward as adding anything in a list.

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/sphinx/formats/jdkpackager.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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</customizejavaapplications>` 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</customizejavaapplications>` for details.


Example
Expand Down
62 changes: 36 additions & 26 deletions src/sphinx/gettingstarted.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,51 +71,64 @@ Packaging Formats
<h2>*.deb</h2>
<p>Packaging format for Debian based systems like Ubuntu</p>
<pre>debian:packageBin</pre>
<a class="btn btn-primary btn-lg" href="formats/debian.html" role="button"><i class="fa fa-linux"></i> Debian Plugin »</a>
<a class="btn btn-success" href="formats/debian.html" role="button"><i class="fa fa-linux"></i> Debian Plugin »</a>
</div>
<div class="col-lg-3">
<div class="col-lg-3 col-lg-offset-1">
<h2>*.rpm</h2>
<p>Packaging format for Redhat based systems like RHEL or CentOS.</p>
<pre>rpm:packageBin</pre>
<a class="btn btn-primary btn-lg" href="formats/rpm.html" role="button"><i class="fa fa-linux"></i> Rpm Plugin »</a>
<a class="btn btn-success" href="formats/rpm.html" role="button"><i class="fa fa-linux"></i> Rpm Plugin »</a>
</div>
<div class="col-lg-3">
<div class="col-lg-3 col-lg-offset-1">
<h2>*.msi</h2>
<p>Packaging format for windows systems.</p>
<pre>windows:packageBin</pre>
<a class="btn btn-primary btn-lg" href="formats/windows.html" role="button"><i class="fa fa-windows"></i> Windows Plugin »</a>
<a class="btn btn-success" href="formats/windows.html" role="button"><i class="fa fa-windows"></i> Windows Plugin »</a>
</div>
<br>
</div>

<div class="row" style="margin-top:20px;">
<div class="col-lg-3">
<h2>*.dmg</h2>
<p>Packaging format for osx based systems.</p>
<pre>universal:packageOsxDmg</pre>
<a class="btn btn-primary btn-lg" href="formats/universal.html" role="button"><i class="fa fa-apple"></i> Universal Plugin »</a>
<a class="btn btn-success" href="formats/universal.html" role="button"><i class="fa fa-apple"></i> Universal Plugin »</a>
</div>
</div>
<div class="row">
<div class="col-lg-3">
<div class="col-lg-3 col-lg-offset-1">
<h2>docker</h2>
<p>Package your application in a docker container.</p>
<pre>docker:publishLocal</pre>
<a class="btn btn-primary btn-lg" href="formats/docker.html" role="button"><i class="fa fa-file-archive-o"></i> Docker Plugin »</a>
<a class="btn btn-success" href="formats/docker.html" role="button"><i class="fa fa-file-archive-o"></i> Docker Plugin »</a>
</div>
<div class="col-lg-3">
<div class="col-lg-3 col-lg-offset-1">
<h2>*.zip</h2>
<p>Packaging format for all systems supporting zip.</p>
<pre>universal:packageBin</pre>
<a class="btn btn-primary btn-lg" href="formats/universal.html" role="button"><i class="fa fa-file-archive-o"></i> Universal Plugin »</a>
<a class="btn btn-success" href="formats/universal.html" role="button"><i class="fa fa-file-archive-o"></i> Universal Plugin »</a>
</div>
<br>
</div>


<div class="row" style="margin-top:20px;">
<div class="col-lg-3">
<h2>*.tar</h2>
<p>Packaging format for all systems supporting tar.</p>
<pre>universal:packageZipTarball</pre>
<a class="btn btn-primary btn-lg" href="formats/universal.html" role="button"><i class="fa fa-file-archive-o"></i> Universal Plugin »</a>
<a class="btn btn-success" href="formats/universal.html" role="button"><i class="fa fa-file-archive-o"></i> Universal Plugin »</a>
</div>
<div class="col-lg-3">
<div class="col-lg-3 col-lg-offset-1">
<h2>*.xz</h2>
<p>Packaging format for all systems supporting xz.</p>
<pre>universal:packageXzTarball</pre>
<a class="btn btn-primary btn-lg" href="formats/universal.html" role="button"><i class="fafa-file-archive-o"></i> Universal Plugin »</a>
<a class="btn btn-success" href="formats/universal.html" role="button"><i class="fa fa-file-archive-o"></i> Universal Plugin »</a>
</div>
<div class="col-lg-3 col-lg-offset-1">
<h2>jdkpackager</h2>
<p>Oracle javapackager create packages for your running platform.</p>
<pre>jdkPackager:packageBinl</pre>
<a class="btn btn-success" href="formats/jdkpackager.html" role="button"><i class="fa fa-coffee"></i> JDK Packager Plugin »</a>
</div>
</div>

Expand All @@ -129,24 +142,17 @@ Archetypes

<hr>
<div class="row">
<div class="col-lg-4">
<div class="col-lg-6">
<h2>Java Application</h2>
<p>Creates a standalone package with an executable bash/bat script.<br>&nbsp; </p>
<pre>enablePlugins(JavaAppPackaging)</pre>
<a class="btn btn-primary btn-lg" href="archetypes/java_app/" role="button"><i class="fa fa-play-circle-o"></i> Learn more »</a>
<a class="btn btn-success" href="archetypes/java_app/" role="button"><i class="fa fa-play-circle-o"></i> Learn more »</a>
</div>
<div class="col-lg-4">
<div class="col-lg-6">
<h2>Java Server</h2>
<p>Creates a standalone package with an executable bash/bat script and additional configuration and autostart.</p>
<pre>enablePlugins(JavaServerAppPackaging)</pre>
<a class="btn btn-primary btn-lg" href="archetypes/java_server/" role="button"><i class="fa fa-gears"></i> Learn more »</a>
</div>
<div class="col-lg-4">
<h2>Akka Microkernel</h2>
<p>Like a the Java Application archetype, but instantiates and runs a subclass of
<a href="https://github.com/akka/akka/blob/master/akka-kernel/src/main/scala/akka/kernel/Main.scala">Bootable</a><br>&nbsp;</p>
<pre>enablePlugins(AkkaAppPackaging)</pre>
<a class="btn btn-primary btn-lg" href="archetypes/akka_app/" role="button"><i class="fa fa-cubes"></i> Learn more »</a>
<a class="btn btn-success" href="archetypes/java_server/" role="button"><i class="fa fa-gears"></i> Learn more »</a>
</div>
</div>

Expand All @@ -155,6 +161,10 @@ Archetypes
Sitemap
=======

.. raw:: html

<hr>

.. toctree::
:maxdepth: 2

Expand Down