 ------
 Predefined Assembly Descriptors
 ------
 Johnny R. Ruiz III <jruiz@exist.com>
 Edwin Punzalan
 John Casey
 ------
 2 November 2006
 ------

~~ Licensed to the Apache Software Foundation (ASF) under one
~~ or more contributor license agreements.  See the NOTICE file
~~ distributed with this work for additional information
~~ regarding copyright ownership.  The ASF licenses this file
~~ to you under the Apache License, Version 2.0 (the
~~ "License"); you may not use this file except in compliance
~~ with the License.  You may obtain a copy of the License at
~~
~~   http://www.apache.org/licenses/LICENSE-2.0
~~
~~ Unless required by applicable law or agreed to in writing,
~~ software distributed under the License is distributed on an
~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~~ KIND, either express or implied.  See the License for the
~~ specific language governing permissions and limitations
~~ under the License.

~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/doxia/references/apt-format.html

Pre-defined Descriptor Files

  As of version 2.2, there are now four predefined descriptor formats available
  for reuse, packaged within the Assembly Plugin, instead of the original three.
  Their descriptorIds are:

  * {{{#bin}bin}} - can be used for general assembly of binary packages.

  * {{{#jar-with-dependencies}jar-with-dependencies}} - can be used for general
  assembly of a binary package with all the dependency libraries included
  unpacked inside the archive.

  * {{{#src}src}} - can be used for general assembly of a source archive which can
  be used to build your project.

  * {{{#project}project}} - <<new in version 2.2>>, this is used to create an
  assembly of the entire source project, including the Maven POM and other files
  outside of your source directory structure, but excluding all SCM files and
  the target directory. <<GOTCHA:>> If you use an output directory other than
  /target, this descriptorRef may include the output from your build process.

* {bin}

  Use <<<bin>>> as the <<<descriptorRef>>> of your assembly-plugin configuration
  in order to create a binary distribution archive of your project.
  This built-in descriptor produces an assembly with the classifier <<<bin>>>
  in three archive formats: tar.gz, tar.bz2, and zip.

  The assembled archive contains the binary jar produced by running
  <<<mvn package>>> plus any README, LICENSE, and NOTICE files available in the
  project root directory.

  Below is the <<<bin>>> descriptor format:

-----
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  <id>bin</id>
  <formats>
    <format>tar.gz</format>
    <format>tar.bz2</format>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <includes>
        <include>${project.basedir}/README*</include>
        <include>${project.basedir}/LICENSE*</include>
        <include>${project.basedir}/NOTICE*</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>${project.build.directory}</directory>
      <includes>
        <include>*.jar</include>
      </includes>
    </fileSet>
  </fileSets>
</assembly>
------

* {jar-with-dependencies}

  Use <<<jar-with-dependencies>>> as the <<<descriptorRef>>> of your
  assembly-plugin configuration in order to create a jar archive which contains
  the binary output of your project, along its the unpacked dependencies.
  This built-in descriptor produces an assembly with the classifier
  <<<jar-with-dependencies>>> using the jar archive format.

  Below is the <<<jar-with-dependencies>>> descriptor format:

-----
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  <id>jar-with-dependencies</id>
  <formats>
    <format>jar</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <dependencySets>
    <dependencySet>
      <unpack>true</unpack>
      <scope>runtime</scope>
    </dependencySet>
  </dependencySets>
  <fileSets>
    <fileSet>
      <directory>${project.build.outputDirectory}</directory>
    </fileSet>
  </fileSets>
</assembly>
-----

* {src}

  Use <<<src>>> as the <<<descriptorRef>>> in your assembly-plugin configuration
  to create source archives for your project.  The archive will contain the
  contents of your project's <<</src>>> directory structure, for referency by
  your users. The <<<src>>> descriptorId produces an assembly archive with the
  classifier <<<src>>> in three formats: tar.gz, tar.bz2, and zip.

  Below is the <<<src>>> descriptor format:

-----
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  <id>src</id>
  <formats>
    <format>tar.gz</format>
    <format>tar.bz2</format>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <includes>
        <include>${project.basedir}/README*</include>
        <include>${project.basedir}/LICENSE*</include>
        <include>${project.basedir}/NOTICE*</include>
        <include>${project.basedir}/pom.xml</include>
      </includes>
      <useDefaultExcludes>true</useDefaultExcludes>
    </fileSet>
    <fileSet>
      <directory>${project.basedir}/src</directory>
      <useDefaultExcludes>true</useDefaultExcludes>
    </fileSet>
  </fileSets>
</assembly>
-----

* {project}

  Using the <<<project>>> <<<\<descriptorRef\>>>> in your assembly plugin
  configuration will produce an assembly containing your entire project, minus
  any build output that lands in the <<</target>>> directory. The resulting
  assembly should allow your users to build your project using Maven, Ant, or
  whatever build system you have configured in your project's normal SCM working
  directory. It produces assemblies with the classifier <<<project>>> in
  three archive formats: tar.gz, tar.bz2, and zip.

  The following is the assembly descriptor for the <<<project>>> descriptorRef:

---
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  <id>project</id>
  <formats>
    <format>tar.gz</format>
    <format>tar.bz2</format>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <directory>${project.basedir}</directory>
      <useDefaultExcludes>true</useDefaultExcludes>
      <excludes>
        <exclude>${project.build.directory}/**</exclude>
      </excludes>
    </fileSet>
  </fileSets>
</assembly>
---
