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>
-&lt;project&gt;
+<pre>&lt;project&gt;
   &lt;parent&gt;
     &lt;artifactId&gt;maven&lt;/artifactId&gt;
     &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
@@ -256,21 +255,21 @@
         &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
         &lt;version&gt;2.4&lt;/version&gt;
         &lt;configuration&gt;
-          &lt;descriptor&gt;src/main/assembly/dep.xml&lt;/descriptor&gt;
+          &lt;descriptor&gt;src/assembly/dep.xml&lt;/descriptor&gt;
         &lt;/configuration&gt;
       &lt;/plugin&gt;
     &lt;/plugins&gt;
   &lt;/build&gt;
   ...
-&lt;/project&gt;
-</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>
+&lt;/project&gt;</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>
-&lt;assembly&gt;
+<pre>&lt;assembly xmlns=&quot;http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2&quot; 
+  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+  xsi:schemaLocation=&quot;http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd&quot;&gt;
   &lt;id&gt;bin&lt;/id&gt;
   &lt;formats&gt;
     &lt;format&gt;tar.gz&lt;/format&gt;
@@ -279,6 +278,8 @@
   &lt;/formats&gt;
   &lt;fileSets&gt;
     &lt;fileSet&gt;
+      &lt;directory&gt;${project.basedir}&lt;/directory&gt;
+      &lt;outputDirectory&gt;/&lt;/outputDirectory&gt;
       &lt;includes&gt;
         &lt;include&gt;README*&lt;/include&gt;
         &lt;include&gt;LICENSE*&lt;/include&gt;
@@ -286,18 +287,27 @@
       &lt;/includes&gt;
     &lt;/fileSet&gt;
     &lt;fileSet&gt;
-      &lt;directory&gt;target&lt;/directory&gt;
-      &lt;outputDirectory&gt;&lt;/outputDirectory&gt;
+      &lt;directory&gt;${project.build.directory}&lt;/directory&gt;
+      &lt;outputDirectory&gt;/&lt;/outputDirectory&gt;
       &lt;includes&gt;
         &lt;include&gt;*.jar&lt;/include&gt;
       &lt;/includes&gt;
     &lt;/fileSet&gt;
+    &lt;fileSet&gt;
+      &lt;directory&gt;${project.build.directory}/site&lt;/directory&gt;
+      &lt;outputDirectory&gt;docs&lt;/outputDirectory&gt;
+    &lt;/fileSet&gt;
   &lt;/fileSets&gt;
-&lt;/assembly&gt;
-</pre></div>
-<div class="source">
-<pre>
-&lt;assembly&gt;
+&lt;/assembly&gt;</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>&lt;assembly 
+  xmlns=&quot;http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2&quot; 
+  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+  xsi:schemaLocation=&quot;http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 
+  http://maven.apache.org/xsd/assembly-1.1.2.xsd&quot;&gt;
+
   &lt;!-- TODO: a jarjar format would be better --&gt;
   &lt;id&gt;dep&lt;/id&gt;
   &lt;formats&gt;
@@ -328,9 +338,11 @@
   &lt;/dependencySets&gt;
 &lt;/assembly&gt;
 </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>
-&lt;assembly&gt;
+<pre>&lt;assembly xmlns=&quot;http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2&quot; 
+  xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+  xsi:schemaLocation=&quot;http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd&quot;&gt;
   &lt;id&gt;src&lt;/id&gt;
   &lt;formats&gt;
     &lt;format&gt;tar.gz&lt;/format&gt;
@@ -339,25 +351,25 @@
   &lt;/formats&gt;
   &lt;fileSets&gt;
     &lt;fileSet&gt;
+      &lt;directory&gt;${project.basedir}&lt;/directory&gt;
       &lt;includes&gt;
         &lt;include&gt;README*&lt;/include&gt;
         &lt;include&gt;LICENSE*&lt;/include&gt;
         &lt;include&gt;NOTICE*&lt;/include&gt;
         &lt;include&gt;pom.xml&lt;/include&gt;
       &lt;/includes&gt;
+      &lt;useDefaultExcludes&gt;true&lt;/useDefaultExcludes&gt;
     &lt;/fileSet&gt;
     &lt;fileSet&gt;
-      &lt;directory&gt;src&lt;/directory&gt;
+      &lt;directory&gt;${project.build.sourceDirectory}/src&lt;/directory&gt;
+      &lt;useDefaultExcludes&gt;true&lt;/useDefaultExcludes&gt;
     &lt;/fileSet&gt;
   &lt;/fileSets&gt;
-&lt;/assembly&gt;
-</pre></div>
-<div class="source">
-<pre>
-mvn assembly:assembly
-</pre></div>
+&lt;/assembly&gt;</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.