apache / apache/maven-assembly-plugin
[MASSEMBLY-835] Assembly Plugin doesn't add the Maven descriptors with the JarArchiver
- Dominant language
- Java
- Stars
- 110
- Forks
- 75
- Avg merge
- 12h 54m
- Merged PRs (30d)
- 10
Description
**[Guillaume Boué](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=gboue)** opened **[MASSEMBLY-835](https://issues.apache.org/jira/browse/MASSEMBLY-835?redirect=false)** and commented
It is possible to configure the Assembly Plugin with an `archiver` parameter. However, only the configured manifest would be added to the JAR archive in `META-INF/MANIFEST.MF`, the other archive configuration are ignored. Notably, the Maven descriptors `pom.xml` and `pom.properties` are not added under `META-INF/maven`, although `addMavenDescriptor` defaults to `true` as per the [Archiver reference](https://maven.apache.org/shared/maven-archiver/). (Note that explictly setting it to `true` doesn't create them either.)
A sample project `MASSEMBLY-835.zip` is attached. Running `mvn clean package`, the created `target/test-1.0-SNAPSHOT-its.jar` has the following structure:
```
├───META-INF
│ MANIFEST.MF
│
└───test-1.0-SNAPSHOT
assembly.xml
pom.xml
```
The expected structure would be:
```
├───META-INF
│ │ MANIFEST.MF
│ │
│ └───maven
│ └───test
│ └───test
│ pom.properties
│ pom.xml
│
└───test-1.0-SNAPSHOT
assembly.xml
pom.xml
```
---
**Affects:** 2.6, 3.5.0
**Attachments:**
- [MASSEMBLY-835.zip](https://issues.apache.org/jira/secure/attachment/12836687/MASSEMBLY-835.zip) (_1.09 kB_)
1 votes, 2 watchers
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the attached MASSEMBLY-835.zip sample project and run `mvn clean package` to reproduce the contents of `target/test-1.0-SNAPSHOT-its.jar`. Trace how the configured `archiver` parameter and `addMavenDescriptor` setting are handled, comparing the actual archive with the expected `META-INF/maven/test/test` entries. Done means the manifest and Maven descriptors are included as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100