You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2019/12/23 01:36:00 UTC

[jira] [Updated] (MASSEMBLY-477) Add option "failOnMissingClassifierArtifact" for multimodule projects

     [ 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)