[ 
https://issues.apache.org/jira/browse/MASSEMBLY-477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Elliotte Rusty Harold updated MASSEMBLY-477:
--------------------------------------------
    Description: 
I have a large multimodule project that needs 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 

{code:java}
InvalidAssemblerConfigurationException( "Cannot find attachment with 
classifier: " + classifier + " in module project: " + project.getId() + ". 
Please exclude this module from the module-set." ) 
{code}

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

{code:xml}
  <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>
{code}

At this time I patched the 
org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.java to 
ignore exception and provide only logger.info message. 

  was:
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 

{code:java}
InvalidAssemblerConfigurationException( "Cannot find attachment with 
classifier: " + classifier + " in module project: " + project.getId() + ". 
Please exclude this module from the module-set." ) 
{code}

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

{code:xml}
  <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>
{code}

At this time I patched the 
org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.java to 
ignore exception and provide only logger.info message. 


> Add option "failOnMissingClassifierArtifact"  for multimodule projects
> ----------------------------------------------------------------------
>
>                 Key: MASSEMBLY-477
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-477
>             Project: Maven Assembly Plugin
>          Issue Type: Improvement
>          Components: moduleSet
>    Affects Versions: 2.2-beta-5
>         Environment: Maven 2.2.1, Sun JDK 1.6.0_u18, Win7/Linux
>            Reporter: Petr Novak
>            Priority: Major
>         Attachments: ModuleSetAssemblyPhase.java
>
>
> I have a large multimodule project that needs 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 
> {code:java}
> InvalidAssemblerConfigurationException( "Cannot find attachment with 
> classifier: " + classifier + " in module project: " + project.getId() + ". 
> Please exclude this module from the module-set." ) 
> {code}
> 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
> {code:xml}
>   <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>
> {code}
> 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 was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to