apache / apache/maven-shade-plugin
minimizeJar too aggressive
- Dominant language
- Java
- Stars
- 188
- Forks
- 103
- Avg merge
- 16h 39m
- Merged PRs (30d)
- 4
Description
### Affected version
3.6.0
### Bug description
I'm shading the com.fasterxml.woodstox:woodstox-core:7.0.0 library.
`META-INF/services/javax.xml.stream.XMLEventFactory`:
`my.shaded.wstx.stax.WstxEventFactory`
`META-INF/services/javax.xml.stream.XMLInputFactory`:
`my.shaded.wstx.stax.WstxInputFactory`
`META-INF/services/javax.xml.stream.XMLOutputFactory`:
`my.shaded.wstx.stax.WstxOutputFactory`
With minimizeJar set to true, even though we have the above references to these Factory classes. The Factory classes are minimized out.
For now my work-around is to create a static reference to the Factories 😭
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how minimizeJar handles META-INF/services entries and referenced javax.xml.stream factory classes. Reproduce the report with woodstox-core:7.0.0 and minimizeJar enabled, then verify that WstxEventFactory, WstxInputFactory, and WstxOutputFactory are retained without static references.
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
- 38/100