[ 
http://jira.codehaus.org/browse/MSHADE-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=164742#action_164742
 ] 

Sergei Ivanov commented on MSHADE-43:
-------------------------------------

This is not actually needed, because the desired effect can be achieved using 
the existing transformers ('spring.handlers' and 'spring.schemas' are just 
plain property files and can be concatenated). It would be beneficial for the 
community if the configuration fragment below was added to the plugin FAQ.
We use the following shade plugin configuration to deal with the Spring 
namespace configuration:
{code:xml}
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-shade-plugin</artifactId>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>shade</goal>
            </goals>
            <configuration>
                <transformers>
                    <transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                        <resource>META-INF/spring.handlers</resource>
                    </transformer>
                    <transformer 
implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                        <resource>META-INF/spring.schemas</resource>
                    </transformer>
                </transformers>
            </configuration>
        </execution>
    </executions>
</plugin>
{code}

> spring.schemas and spring.handlers support
> ------------------------------------------
>
>                 Key: MSHADE-43
>                 URL: http://jira.codehaus.org/browse/MSHADE-43
>             Project: Maven 2.x Shade Plugin
>          Issue Type: New Feature
>    Affects Versions: 1.2
>            Reporter: Erik Post
>         Attachments: maven-shade-plugin-spring-support.patch
>
>
> The attached patch adds support for merging the spring.schemas and 
> spring.handlers files when shading a project that has multiple spring 
> dependencies. The spring.schemas and spring.handlers files contain 
> configuration data that is used by the Spring Framework when parsing context 
> configuration XML files.
> The patch adds two resource transformers (SpringHandlersResourceTransformer 
> and SpringSchemasResourceTransformer) that merge the contents of all 
> encountered spring.handlers and spring.schemas files, and puts the merged 
> files in the shaded jar. I based the code on the 
> ComponentXmlResourceTransfomer. Unit tests are included.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to