apache / apache/maven-assembly-plugin

[MASSEMBLY-477] Add option "failOnMissingClassifierArtifact" for multimodule projects

Open
#641 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
110
Forks
75
Avg merge
12h 54m
Merged PRs (30d)
10

Description

**[Petr Novak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=kek)** opened **[MASSEMBLY-477](https://issues.apache.org/jira/browse/MASSEMBLY-477?redirect=false)** and commented

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 \, when used and some submodule does not support this classifier, than the

```java
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 \ 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

```xml



*-api


sources
false
/
true
false

```

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

---

**Affects:** 2.2-beta-5

**Attachments:**
- [ModuleSetAssemblyPhase.java](https://issues.apache.org/jira/secure/attachment/12714148/ModuleSetAssemblyPhase.java) (_20.59 kB_)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading org.apache.maven.plugin.assembly.archive.phase.ModuleSetAssemblyPhase.java and the attached patched version, then compare the requested option with Maven Dependency Plugin's failOnMissingClassifierArtifact behavior. Done means the assembly descriptor accepts the option and a missing classifier artifact is handled according to its setting instead of always failing.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.