Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.1
-
Fix Version/s: 2.2-beta-2
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
I have a multi-project folders setup like one shown below,
root
| _ sub-folder1 |
| _ sub-folder2 |
| _ sub-folder3 |
| _ etc |
Have a root pom.xml at the root folder level and in that I have defined
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/descriptor.xml
</descriptor>
</descriptors>
</configuration>
</plugin>
Above descriptor works fine only if I have defined a descriptor file on the src/main/assembly folder for each sub-folder1, sub-folder2, etc.
It would be great if maven supports me in defining a common assembly descriptor and can be shared by all the sub modules from a common location.
Issue Links
| This issue is duplicated by: | ||||
| MASSEMBLY-76 | [assembly plugin] improve or clarify inheriting/reusing descriptors |
|
|
|
| This issue relates to: | ||||
| MASSEMBLY-391 | Sharing a default assembly descriptor across sub modules does not work if invoked from parent project |
|
|
|
I just enabled this feature, with a slightly different solution. What you're really talking about is a standard assembly descriptor for more than one project. If your descriptor were built into the assembly plugin, it'd simply be a standard descriptorRef configuration. To enable this sort of behavior for standardized descriptors outside the assembly plugin itself, you can do the following:
Define a project that contains the standardized descriptor. Here's an example layout based on the integration test in:
http://svn.apache.org/repos/asf/maven/plugins/maven-assembly-plugin/src/it/basic-features/assemblyDescriptor-artifact
The pom.xml looks like this:
The assembly descriptor is in src/main/resources/assembly-descriptor.xml by default, and looks like this in the example:
(so, pretty much normal).
You can use the standard descriptor after installing it into the repository with a pom.xml like the following:
Note the extension in the standard descriptor's pom.xml.