Add option "failOnMissingClassifierArtifact" for multimodule projects
----------------------------------------------------------------------
Key: MASSEMBLY-477
URL: http://jira.codehaus.org/browse/MASSEMBLY-477
Project: Maven 2.x Assembly Plugin
Issue Type: Improvement
Affects Versions: 2.2-beta-5
Environment: Maven 2.2.1, Sun JDK 1.6.0_u18, Win7/Linux
Reporter: Kek
Attachments: ModuleSetAssemblyPhase.java
I have a large multimodule projects that need to create compact distribution
files at the root of the modules hierarchy. I want to use the assembly plugin
with predefined descriptors for merging submodules classes, sources, tests,
resources, configuration, etc. The following descriptor shows the sample of my
definition. But there is an issue with usage of <attachmentClassifier>, when
used and some submodule does not support this classifier, than the
InvalidAssemblerConfigurationException( "Cannot find attachment with
classifier: " + classifier + " in module project: " + project.getId() + ".
Please exclude this module from the module-set." )
is thrown. It will be great, that the new <failOnMissingClassifierArtifact>
could be supported - it is inspired by the sameoption in
maven-dependency-plugin:
http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependencies-mojo.html#failOnMissingClassifierArtifact
<moduleSets>
<moduleSet>
<includes>
<include>*-api</include>
</includes>
<binaries>
<attachmentClassifier>sources</attachmentClassifier>
<failOnMissingClassifierArtifact>false</failOnMissingClassifierArtifact>
<outputDirectory>/</outputDirectory>
<unpack>true</unpack>
<includeDependencies>false</includeDependencies>
</binaries>
</moduleSet>
</moduleSets>
At this time I patched the
org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.java to
ignore exception and provide only logger.info message.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira