You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by da...@apache.org on 2006/05/30 16:53:28 UTC
svn commit: r410297 -
/maven/plugins/trunk/maven-assembly-plugin/src/site/apt/howto.apt
Author: dantran
Date: Tue May 30 07:53:27 2006
New Revision: 410297
URL: http://svn.apache.org/viewvc?rev=410297&view=rev
Log:
add howto reused assembly's components
Modified:
maven/plugins/trunk/maven-assembly-plugin/src/site/apt/howto.apt
Modified: maven/plugins/trunk/maven-assembly-plugin/src/site/apt/howto.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/site/apt/howto.apt?rev=410297&r1=410296&r2=410297&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/site/apt/howto.apt (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/site/apt/howto.apt Tue May 30 07:53:27 2006
@@ -137,3 +137,51 @@
Keep in mind that any dependencies specified in the POM will have their transitive dependencies placed in the
assembly as well.
+
+
+* How to reuse assembly's component
+
+ There are situations where your project can produce multiple assemblies with the same set of
+ denpendencySets, fileSets and/or files. Instead of duplicating those elements in all assembly descriptors,
+ you can refactor them out into common component descriptor(s)
+
+ Here is an example of assembly descriptor that uses component descriptor(s)
+
+-----
+ <assembly>
+ <id>someid</id>
+ <formats>
+ <format>zip</format>
+ </formats>
+ <componentDescriptors>
+ <componentDescriptor>src/main/assembly/component.xml</componentDescriptor>
+ </componentDescriptors>
+ </assembly>
+-----
+
+
+ and here is an example of component descriptor file
+
+-----
+<component>
+ <dependencySets>
+ <dependencySet>
+ ....
+ </dependencySet>
+ ....
+ </dependencySets>
+ <fileSets>
+ <fileSet>
+ .....
+ </fileSet>
+ .....
+ </fileSets>
+ <files>
+ <file>
+ .....
+ </file>
+ </files>
+</component>
+-----
+
+