maven-shade-plugin icon indicating copy to clipboard operation
maven-shade-plugin copied to clipboard

[MSHADE-149] XmlAppendingTransformer not adequate for aop-ajc.xml files

Open jira-importer opened this issue 12 years ago • 1 comments

Pascal Pochet opened MSHADE-149 and commented

When merging aop-ajc.xml files (== merging several AspectJ jars...), XmlAppendingTransformer generates: <aspectj> <aspects> ...aspects of jar 1 </aspects> <aspects> ...aspects of jar 2 </aspects> ... <aspects> ...aspects of jar N </aspects> <aspectj> instead of <aspectj> <aspects> ...aspects of jar 1 ...aspects of jar 2

...aspects of jar N

</aspects> <aspectj>

Solution: add the attached transformer to the list of existing ones.

and in pom.xml:

<transformer implementation="org.apache.maven.plugins.shade.resource.AopAjcXmlResourceTransformer"> <resource>META-INF/aop-ajc.xml</resource> </transformer>

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:

jira-importer avatar Jun 11 '13 13:06 jira-importer

Elliotte Rusty Harold commented

I don;t know anything about AOP. Does this make sense?

jira-importer avatar Dec 18 '19 11:12 jira-importer