apache / apache/maven-assembly-plugin
[MASSEMBLY-803] Add file name mapping option when extracting dependencies
- Dominant language
- Java
- Stars
- 110
- Forks
- 75
- Avg merge
- 12h 54m
- Merged PRs (30d)
- 10
Description
**[Plamen Totev](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=plamenttv)** opened **[MASSEMBLY-803](https://issues.apache.org/jira/browse/MASSEMBLY-803?redirect=false)** and commented
Hi,
Currently when using `dependencySets` with `unpack` set to `true`, there is no way to set the output file names mapping. As plexus-io supports file names mapping, I think it will be relatively easy to add such option.
Consider the following scenario. You want to distribute tomcat as part of your product. You could add something like that;
```xml
org.apache.tomcat:tomcat:8.0.33:zip
true
```
So far so good. But the zip archive contains `apache-tomcat-8.0.33` as root folder.What if I want to distribute it under `tomcat`? There is no way(AFAIK) to just extract sub folder of the archive. Of course there is `` tag but the matched files will be still under `apache-tomcat-8.0.33/...`
The use of `FileMapper` for example may strip the root folder (the `RegExpFileMapper` seems like a perfect candidate).
What do you think about such feature?
p.s. Not quite sure where is the proper place to discuss such improvements requests - here or in the mailing list. So excuse me if this is not the proper place.
---
**Issue Links:**
- [MASSEMBLY-863](https://issues.apache.org/jira/browse/MASSEMBLY-863) Add ability to set outputDirectory in unpackOptions
(_**"duplicates"**_)
1 votes, 4 watchers
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the dependencySets unpack handling and the plexus-io FileMapper support, especially whether RegExpFileMapper can be passed through. The issue is marked as a duplicate of MASSEMBLY-863; done would mean an unpacked dependency set can map archive paths so the apache-tomcat-8.0.33 root becomes tomcat.
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
- Mostly clear
- Newbie friendliness
- 30/100