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

Dennis Lundberg updated MASSEMBLY-477:
--------------------------------------

        Component/s: moduleSet
        Description: 
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. 

  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 

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. 

    Patch Submitted: Yes
    
> Add option "failOnMissingClassifierArtifact"  for multimodule projects
> ----------------------------------------------------------------------
>
>                 Key: MASSEMBLY-477
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-477
>             Project: Maven 2.x 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: 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 
> {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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to