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

Mark Struberg commented on MSHADE-83:
-------------------------------------

The patch is imo definitely better than our current implementation which 
doesn't filter source jars at all. The users need be be carefully if they 
filter only with includes of course, because there is currently only one filter 
ruleset available for both class jars and source jars.

> Allow filters to work when creating the sources jar
> ---------------------------------------------------
>
>                 Key: MSHADE-83
>                 URL: http://jira.codehaus.org/browse/MSHADE-83
>             Project: Maven 2.x Shade Plugin
>          Issue Type: Bug
>    Affects Versions: 1.3.3
>            Reporter: Jakob Korherr
>            Assignee: Mark Struberg
>         Attachments: shade-filter-sources-test.patch, 
> shade-filter-sources.patch
>
>
> While using the maven-shade-plugin for Apache MyFaces I ran into this error:
> I use a filter to include a subset of classes from another artifact. 
> Everything works fine for the "binary" artifact, but when creating the 
> -sources.jar (createSourcesJar = true) the filter does not apply.
> After some digging in the code I found out that SimpleFilter gets a Set of 
> jar files for which it should be applied. Here, however, only the "binary" 
> jar file is added and not also the -sources.jar file. Thus the canFilter() 
> check fails later when creating the -sources.jar via shader.shade().
> The attached patch solves this problem by adding the -sources.jar to the Set 
> of jar files if createSourcesJar is true. I already tested it and it works 
> just fine. Furthermore the test-patch provides a JUnit test case for this 
> scenario.
> Thanks for looking at this,
> Jakob

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