mirror of https://github.com/apache/maven.git
set property
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@327849 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9de61ebc90
commit
73fa7a4522
|
@ -1,129 +1,129 @@
|
||||||
------
|
------
|
||||||
Maven 2 Assembly Plugin
|
Maven 2 Assembly Plugin
|
||||||
------
|
------
|
||||||
Johnny R. Ruiz III
|
Johnny R. Ruiz III
|
||||||
<jruiz@exist.com>
|
<jruiz@exist.com>
|
||||||
------
|
------
|
||||||
October 16, 2005
|
October 16, 2005
|
||||||
|
|
||||||
How to Use
|
How to Use
|
||||||
|
|
||||||
These is a brief example on how to use the assembly:assembly goal and assembly:unpack goal.
|
These is a brief example on how to use the assembly:assembly goal and assembly:unpack goal.
|
||||||
|
|
||||||
To use the assembly:assembly goal, you must define the descriptor file that you are going to use or
|
To use the assembly:assembly goal, you must define the descriptor file that you are going to use or
|
||||||
define the descriptorId from the predefined {{{descriptor.html}descriptor ids}}.
|
define the descriptorId from the predefined {{{descriptor.html}descriptor ids}}.
|
||||||
|
|
||||||
|
|
||||||
* How To use assembly:assembly using a customized descriptor file.
|
* How To use assembly:assembly using a customized descriptor file.
|
||||||
|
|
||||||
-----
|
-----
|
||||||
m2 assembly:assembly -Ddescriptor=path/to/descriptor.xml
|
m2 assembly:assembly -Ddescriptor=path/to/descriptor.xml
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|
||||||
* How to use assembly:assembly using predefined descriptor ids.
|
* How to use assembly:assembly using predefined descriptor ids.
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
m2 assembly:assembly -DdescriptorId=bin
|
m2 assembly:assembly -DdescriptorId=bin
|
||||||
|
|
||||||
or m2 assembly:assembly -DdescriptorId=jar-with-dependencies
|
or m2 assembly:assembly -DdescriptorId=jar-with-dependencies
|
||||||
|
|
||||||
or m2 assembly:assembly -DdescriptorId=src
|
or m2 assembly:assembly -DdescriptorId=src
|
||||||
|
|
||||||
-----
|
-----
|
||||||
|
|
||||||
* How to configure assembly:assembly plugin in pom.xml
|
* How to configure assembly:assembly plugin in pom.xml
|
||||||
|
|
||||||
You can also configure this plugin inside your pom.xml. To run use "m2 assembly:assembly".
|
You can also configure this plugin inside your pom.xml. To run use "m2 assembly:assembly".
|
||||||
|
|
||||||
-------------------
|
-------------------
|
||||||
<project>
|
<project>
|
||||||
...
|
...
|
||||||
<build>
|
<build>
|
||||||
...
|
...
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>2.0-beta-1</version>
|
<version>2.0-beta-1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<descriptor>path/to/descriptor.xml</descriptor>
|
<descriptor>path/to/descriptor.xml</descriptor>
|
||||||
<finalName>final_name</finalName>
|
<finalName>final_name</finalName>
|
||||||
<outputDirectory>output/directory</outputDirectory>
|
<outputDirectory>output/directory</outputDirectory>
|
||||||
<workDirectory>target/assembly/work</workDirectory>
|
<workDirectory>target/assembly/work</workDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
...
|
...
|
||||||
</build>
|
</build>
|
||||||
...
|
...
|
||||||
</project>
|
</project>
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
* How to use assembly:unpack
|
* How to use assembly:unpack
|
||||||
|
|
||||||
After running this goal, all dependencies will be extracted at the specified "\<workDirectory\>".
|
After running this goal, all dependencies will be extracted at the specified "\<workDirectory\>".
|
||||||
|
|
||||||
-----
|
-----
|
||||||
m2 assembly:unpack
|
m2 assembly:unpack
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
* How to generate Assembly Download Report
|
* How to generate Assembly Download Report
|
||||||
|
|
||||||
To generate the Download report, maven-assembly-plugin must be configured in \<plugin\> section of your pom.xml.
|
To generate the Download report, maven-assembly-plugin must be configured in \<plugin\> section of your pom.xml.
|
||||||
Take note that the parameter \<finalName\> and \<descriptorId\>/\<descriptor\> are required parameters.
|
Take note that the parameter \<finalName\> and \<descriptorId\>/\<descriptor\> are required parameters.
|
||||||
|
|
||||||
You could generate the Download report by using this command: "m2 assembly:download".
|
You could generate the Download report by using this command: "m2 assembly:download".
|
||||||
|
|
||||||
Here's a sample configuration.
|
Here's a sample configuration.
|
||||||
|
|
||||||
------------
|
------------
|
||||||
<project>
|
<project>
|
||||||
...
|
...
|
||||||
<build>
|
<build>
|
||||||
...
|
...
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>2.0</version>
|
<version>2.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<finalName>finalName-2.1-SNAPSHOT</finalName>
|
<finalName>finalName-2.1-SNAPSHOT</finalName>
|
||||||
<descriptorId>bin</descriptorId>
|
<descriptorId>bin</descriptorId>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
...
|
...
|
||||||
</build>
|
</build>
|
||||||
...
|
...
|
||||||
</project>
|
</project>
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Or in your project pom.xml, add the assembly plugin in \<reporting\> section.
|
Or in your project pom.xml, add the assembly plugin in \<reporting\> section.
|
||||||
Take note, that maven-assembly-plugin must also be configured in \<plugin\> section your pom.xml.
|
Take note, that maven-assembly-plugin must also be configured in \<plugin\> section your pom.xml.
|
||||||
|
|
||||||
And also the parameter \<finalName\> and \<descriptorId\>/\<descriptor\> are required parameters.
|
And also the parameter \<finalName\> and \<descriptorId\>/\<descriptor\> are required parameters.
|
||||||
|
|
||||||
-------------------
|
-------------------
|
||||||
<project>
|
<project>
|
||||||
...
|
...
|
||||||
<reporting>
|
<reporting>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
...
|
...
|
||||||
</project>
|
</project>
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Execute the site plugin to generate the report distribution.
|
Execute the site plugin to generate the report distribution.
|
||||||
|
|
||||||
-------------------
|
-------------------
|
||||||
m2 site:site
|
m2 site:site
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
For full documentation of plugin's goals and parameters, click {{{index.html}here}}.
|
For full documentation of plugin's goals and parameters, click {{{index.html}here}}.
|
||||||
|
|
Loading…
Reference in New Issue