apache / apache/maven-shade-plugin
[MSHADE-149] XmlAppendingTransformer not adequate for aop-ajc.xml files
- Dominant language
- Java
- Stars
- 188
- Forks
- 103
- Avg merge
- 16h 39m
- Merged PRs (30d)
- 4
Description
**[Pascal Pochet](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=p3consulting)** opened **[MSHADE-149](https://issues.apache.org/jira/browse/MSHADE-149?redirect=false)** and commented
When merging aop-ajc.xml files (== merging several AspectJ jars...), XmlAppendingTransformer generates:
\
\
...aspects of jar 1
\
\
...aspects of jar 2
\
...
\
...aspects of jar N
\
\
instead of
\
\
...aspects of jar 1
...aspects of jar 2
...aspects of jar N
\
\
Solution:
add the attached transformer to the list of existing ones.
and in pom.xml:
\
\META-INF/aop-ajc.xml\
\
NB
A more general solution would be to add a parameter to XmlAppendingTransformer to specify the XML level to merge... (maybe as a XPath expression ?)
---
**Attachments:**
- [AopAjcXmlResourceTransformer.java](https://issues.apache.org/jira/secure/attachment/12718959/AopAjcXmlResourceTransformer.java) (_3.61 kB_)
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the attached AopAjcXmlResourceTransformer.java and the existing XmlAppendingTransformer, then inspect pom.xml for resource transformer configuration. The change is complete when META-INF/aop-ajc.xml entries merge their nested contents into one element instead of producing repeated elements.
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
- 42/100