From 258c5ffe6e6af2983906abd7ce923a123c322a0f Mon Sep 17 00:00:00 2001 From: Ugo Matrangolo Date: Thu, 3 Dec 2015 15:04:40 +0000 Subject: [PATCH 1/2] Improve docs on deploying different pkg formats --- src/sphinx/topics/deployment.rst | 83 +++++++++++++++++++++----------- 1 file changed, 55 insertions(+), 28 deletions(-) diff --git a/src/sphinx/topics/deployment.rst b/src/sphinx/topics/deployment.rst index 4ba6f6f43..ad7bdbee2 100644 --- a/src/sphinx/topics/deployment.rst +++ b/src/sphinx/topics/deployment.rst @@ -14,8 +14,8 @@ like this in your ``build.sbt`` publishTo := { val nexus = "https://oss.sonatype.org/" - if (version.value.trim.endsWith("SNAPSHOT")) - Some("snapshots" at nexus + "content/repositories/snapshots") + if (version.value.trim.endsWith("SNAPSHOT")) + Some("snapshots" at nexus + "content/repositories/snapshots") else Some("releases" at nexus + "service/local/staging/deploy/maven2") } @@ -25,8 +25,8 @@ For an automatised build process are other plugins like the `sbt release plugin` .. _sbt publish documentation: http://www.scala-sbt.org/0.13/docs/Publishing.html .. _sbt release plugin: https://github.com/sbt/sbt-release -Default Configuration ---------------------- +Default Deployment +------------------ The easiest way is to add ``UniversalDeployPlugin`` to your ``build.sbt`` .. code-block:: scala @@ -34,28 +34,56 @@ The easiest way is to add ``UniversalDeployPlugin`` to your ``build.sbt`` import NativePackagerKeys._ enablePlugins(JavaServerAppPackaging, UniversalDeployPlugin) - -You are now able to publish your application by scope. +You are now able to publish your packaged application in both ``tgz`` and ``zip`` formats with: + ``universal:publish`` + Publish the ``zip`` (or ``tgz``/``txz`` depending on the configuration. Default is to publish ``zip`` along with ``tgz``) package - ``debian:publish`` - Publish jars along with the ``deb`` package +Custom Deployments +------------------ +When using other package formats we need to explicitely configure the +deployment setup to a more specific one. - ``rpm:publish`` - Publish jars along with the ``rpm`` package - - ``windows:publish`` - Publish jars along with the ``msi`` package +RPM +~~~ - ``universal:publish`` - Publish jars along with the ``zip`` (or ``tgz``/``txz`` depending on the configuration) package - +Your ``build.sbt`` should contain: + +.. code-block:: scala + enablePlugins(RpmPlugin, RpmDeployPlugin) + +This will make possible to push the ``RPM`` with: + + ```sbt rpm:publish`` + +Debian +~~~~~~ + +Enabled with: + +.. code-block:: scala + enable(DebianPlugin, DebianDeployPlugin) +that will make possible to publish a ``deb`` package with: -Custom Configuration --------------------- -You configure only what you need as well. + ``sbt deb:publish`` + +Windows +~~~~~~~ + +If using an ``msi`` packaging you need to enable: + +.. code-block:: scala + enable(WindowsPlugin, WindowsDeployPlugin) + +Then, pushing the package is + + ``sbt windows:publish`` + +Custom Configurations +--------------------- +You could configure only what you need as well. Debian @@ -64,7 +92,7 @@ Debian .. code-block:: scala makeDeploymentSettings(Debian, packageBin in Debian, "deb") - + //if you want a changes file as well makeDeploymentSettings(Debian, genChanges in Debian, "changes") @@ -74,27 +102,26 @@ RPM .. code-block:: scala makeDeploymentSettings(Rpm, packageBin in Rpm, "rpm") - + Windows ~~~~~~~ .. code-block:: scala - makeDeploymentSettings(Windows, packageBin in Windows, "msi") - + makeDeploymentSettings(Windows, packageBin in Windows, "msi") + Universal ~~~~~~~~~ .. code-block:: scala - // zip + // zip makeDeploymentSettings(Universal, packageBin in Universal, "zip") - + makeDeploymentSettings(UniversalDocs, packageBin in UniversalDocs, "zip") - + // additional tgz addPackage(Universal, packageZipTarball in Universal, "tgz") - + // additional txz addPackage(UniversalDocs, packageXzTarball in UniversalDocs, "txz") - From f9081439f356fd57bb4cd70b75a8b64fb2951a18 Mon Sep 17 00:00:00 2001 From: Ugo Matrangolo Date: Thu, 3 Dec 2015 15:20:08 +0000 Subject: [PATCH 2/2] Spell checked --- src/sphinx/topics/deployment.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sphinx/topics/deployment.rst b/src/sphinx/topics/deployment.rst index ad7bdbee2..92d0342c1 100644 --- a/src/sphinx/topics/deployment.rst +++ b/src/sphinx/topics/deployment.rst @@ -42,7 +42,7 @@ You are now able to publish your packaged application in both ``tgz`` and ``zip` Custom Deployments ------------------ -When using other package formats we need to explicitely configure the +When using other package formats we need to explicitly configure the deployment setup to a more specific one. RPM