From 14a594021f65ab8dff9a9d4c6ed923de465f5a6a Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Mon, 9 Nov 2015 22:55:12 -0800 Subject: [PATCH] Documentation for install. --- plug-ins/index.html | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/plug-ins/index.html b/plug-ins/index.html index 9ec04e0..629481f 100644 --- a/plug-ins/index.html +++ b/plug-ins/index.html @@ -134,9 +134,13 @@ application {

Packaging

-The Packaging plug-in lets you generate various archives for your project: jar, war and zip files, each of them defining a directive by the same name inside the assemble directive: +The Packaging plug-in lets you generate (directive assemble) and install (directive install) various archives for your project: jar, war and zip files.

+

assemble

+

+ The assemble directive controls which artifacts get generated for your project. +

 assemble {
     jar {
@@ -148,13 +152,13 @@ assemble {
   If you don't specify a name for your archive, a default one will be used that contains your project name, version and the corresponding suffix, e.g. kobalt-1.1.jar or sec-0.2.war.
 

-

zip

+

zip

All these archives are zip files, so the zip archive is at the top of the hierarchy and jar and war inherit all its attributes, which include name, include and exclude.

-

include and exclude

+

include and exclude

All archives let you include and exclude files. @@ -179,7 +183,7 @@ assemble { The first form, with just one parameter, simply copies the file from your directory into the archive, preserving its path. The second form has three parameters which allow you to move the file to a different path into your archive. Note the use of the from, to and glob directives, which are necessary to disambiguate the call.

-

jar

+

jar

A jar is like a zip with two additional available parameters: @@ -208,18 +212,27 @@ assemble {

-

war

+

war

The war directive generates a war file suitable to be deployed into a servlet container.

-

mavenJars

+

mavenJars

The mavenJars directive generates several jar files (binary, source, javadoc) which are required by Maven repositories. It's basically a shortcut that saves you the trouble from having to assemble these jar files manually in your build file. It allows you to specify Manifest attributes, just like the jar directive.

+

install

+

+ The install section lets you specify how the artifacts get installed. If you don't specify any install directive, then the install task will do nothing on your project when invoked. +

+
+    install {
+        libDir = "libs"
+    }
+

Publishing