You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Pascal Pochet (JIRA)" <ji...@codehaus.org> on 2013/06/11 20:28:03 UTC

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

Pascal Pochet created MSHADE-149:
------------------------------------

             Summary: XmlAppendingTransformer not adequate for aop-ajc.xml files
                 Key: MSHADE-149
                 URL: https://jira.codehaus.org/browse/MSHADE-149
             Project: Maven 2.x Shade Plugin
          Issue Type: Improvement
            Reporter: Pascal Pochet
            Priority: Trivial
         Attachments: AopAjcXmlResourceTransformer.java

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 ?)




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira