You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by bu...@apache.org on 2014/03/22 17:23:49 UTC
svn commit: r902877 - in /websites/staging/maven/trunk/content: ./
guides/mini/guide-assemblies.html maven-site-1.0-site.jar
Author: buildbot
Date: Sat Mar 22 16:23:49 2014
New Revision: 902877
Log:
Staging update by buildbot for maven
Modified:
websites/staging/maven/trunk/content/ (props changed)
websites/staging/maven/trunk/content/guides/mini/guide-assemblies.html
websites/staging/maven/trunk/content/maven-site-1.0-site.jar
Propchange: websites/staging/maven/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Sat Mar 22 16:23:49 2014
@@ -1 +1 @@
-1580221
+1580241
Modified: websites/staging/maven/trunk/content/guides/mini/guide-assemblies.html
==============================================================================
--- websites/staging/maven/trunk/content/guides/mini/guide-assemblies.html (original)
+++ websites/staging/maven/trunk/content/guides/mini/guide-assemblies.html Sat Mar 22 16:23:49 2014
@@ -236,10 +236,9 @@
<div id="contentBox">
<div class="section">
<h2>Guide to creating assemblies<a name="Guide_to_creating_assemblies"></a></h2>
-<p>The assembly mechanism in Maven 2.x provides an easy way to create distributions using a assembly descriptor and dependency information found in you POM. In order to use the assembly plug-in you need to configure the assembly plug-in in your POM and it might look like the following:</p>
+<p>The assembly mechanism in Maven provides an easy way to create distributions using a assembly descriptor and dependency information found in you POM. In order to use the assembly plug-in you need to configure the assembly plug-in in your POM and it might look like the following:</p>
<div class="source">
-<pre>
-<project>
+<pre><project>
<parent>
<artifactId>maven</artifactId>
<groupId>org.apache.maven</groupId>
@@ -256,21 +255,21 @@
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
- <descriptor>src/main/assembly/dep.xml</descriptor>
+ <descriptor>src/assembly/dep.xml</descriptor>
</configuration>
</plugin>
</plugins>
</build>
...
-</project>
-</pre></div>
-<p>You'll notice that the assembly descriptor is located in <tt>${basedir}/src/main/assembly</tt> which is the <a href="../introduction/introduction-to-the-standard-directory-layout.html">standard</a> location for assembly descriptors.</p>
+</project></pre></div>
+<p>You'll notice that the assembly descriptor is located in <tt>${project.basedir}/src/assembly</tt> which is the <a href="../introduction/introduction-to-the-standard-directory-layout.html">standard</a> location for assembly descriptors.</p>
<div class="section">
<h3>Creating a binary assembly<a name="Creating_a_binary_assembly"></a></h3>
<p>This is the most typical usage of the assembly plugin where you are creating a distribution for standard use.</p>
<div class="source">
-<pre>
-<assembly>
+<pre><assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>bin</id>
<formats>
<format>tar.gz</format>
@@ -279,6 +278,8 @@
</formats>
<fileSets>
<fileSet>
+ <directory>${project.basedir}</directory>
+ <outputDirectory>/</outputDirectory>
<includes>
<include>README*</include>
<include>LICENSE*</include>
@@ -286,18 +287,27 @@
</includes>
</fileSet>
<fileSet>
- <directory>target</directory>
- <outputDirectory></outputDirectory>
+ <directory>${project.build.directory}</directory>
+ <outputDirectory>/</outputDirectory>
<includes>
<include>*.jar</include>
</includes>
</fileSet>
+ <fileSet>
+ <directory>${project.build.directory}/site</directory>
+ <outputDirectory>docs</outputDirectory>
+ </fileSet>
</fileSets>
-</assembly>
-</pre></div>
-<div class="source">
-<pre>
-<assembly>
+</assembly></pre></div>
+<p>You can use a manually defined assembly descriptor as mentioned before but it is simpler to use the <a class="externalLink" href="http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#bin">pre-defined assembly descriptor bin</a> in such cases.</p>
+<p>How to use such pre-defined assembly descriptors is described in the <a class="externalLink" href="http://maven.apache.org/plugins/maven-assembly-plugin/usage.html#Configuration">documentation of maven-assembly-plugin</a>.</p>
+<div class="source">
+<pre><assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
+ http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+
<!-- TODO: a jarjar format would be better -->
<id>dep</id>
<formats>
@@ -328,9 +338,11 @@
</dependencySets>
</assembly>
</pre></div>
+<p>If you like to create a source distribution package the best solution is to use the <a class="externalLink" href="http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#src">pre-defined assembly descriptor src</a> for such purposes.</p>
<div class="source">
-<pre>
-<assembly>
+<pre><assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>src</id>
<formats>
<format>tar.gz</format>
@@ -339,25 +351,25 @@
</formats>
<fileSets>
<fileSet>
+ <directory>${project.basedir}</directory>
<includes>
<include>README*</include>
<include>LICENSE*</include>
<include>NOTICE*</include>
<include>pom.xml</include>
</includes>
+ <useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
<fileSet>
- <directory>src</directory>
+ <directory>${project.build.sourceDirectory}/src</directory>
+ <useDefaultExcludes>true</useDefaultExcludes>
</fileSet>
</fileSets>
-</assembly>
-</pre></div>
-<div class="source">
-<pre>
-mvn assembly:assembly
-</pre></div>
+</assembly></pre></div>
+<p>You can now create the defined distribution packages via command line like this:</p>
<div class="source">
-<pre></pre></div></div></div>
+<pre>mvn assembly:single</pre></div>
+<p>But the best solution is to create such distribution package within the life-cycle.</p></div></div>
</div>
</div>
<div class="clear">
Modified: websites/staging/maven/trunk/content/maven-site-1.0-site.jar
==============================================================================
Binary files - no diff available.