apache / apache/maven-assembly-plugin
[MASSEMBLY-877] give priority to module files when using jar-with-dependencies descriptor
- Dominant language
- Java
- Stars
- 110
- Forks
- 75
- Avg merge
- 12h 54m
- Merged PRs (30d)
- 10
Description
**[Simon](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=sbernard)** opened **[MASSEMBLY-877](https://issues.apache.org/jira/browse/MASSEMBLY-877?redirect=false)** and commented
Currently, when you create an uber jar using `jar-with-dependencies` descriptor if there is resource duplicates between current module and dependencies there is no guarantee the module one will be chosen.
E.g. :
module A depends on module B.
module A and module B contains a configuration file with the same name/ same path.
If I build A using jar-with-dependencies descriptor I have no guarantee my assembly will contains the configuration file of A.
I think this is because jar-with-dependencies use \true\ and so there is no priority between the module and its dependencies.
A solution could be to change the descriptor and use something like this :
```xml
jar-with-dependencies
jar
false
${project.build.outputDirectory}
/
false
true
runtime
```
As FileSet have priority on dependencySet, it should do the tricks.
Does it make sense ?
---
No further details from [MASSEMBLY-877](https://issues.apache.org/jira/browse/MASSEMBLY-877?redirect=false)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the jar-with-dependencies assembly descriptor and the code or tests that process its fileSets and dependencySets. Reproduce an assembly where the module and a dependency contain the same resource path, then verify that the module's resource is retained and add or update coverage for that behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100