Trask Stalnaker created MSHADE-112:
--------------------------------------

             Summary: New property to enable shading the java text inside the 
sources artifact (not just shading the java source file locations)
                 Key: MSHADE-112
                 URL: https://jira.codehaus.org/browse/MSHADE-112
             Project: Maven 2.x Shade Plugin
          Issue Type: New Feature
    Affects Versions: 1.6
            Reporter: Trask Stalnaker
         Attachments: shade-sources-content.patch

The existing createSourcesJar property shades the source file locations, but it 
doesn't shade their content.

This makes debugging (when using a shaded artifact) a little painful (at least 
in Eclipse) since the source files that Eclipse finds don't match up with the 
package names in the runtime environment.

The attached patch performs a rather naive regular expression search/replace 
throughout the java source files when building the shaded sources artifact.  
The patch also makes the assumption that the source files are all UTF-8 
encoded.  This latter issue seems especially problematic, and for this reason I 
have made this feature a new option (shadeSourcesContent) as opposed to making 
it the default behavior when createSourcesJar=true.

It looks like there are a couple of java libraries that attempt to do encoding 
detection, if something like this is required to get this patch committed I can 
investigate this further, or if anyone has other ideas how to handle this 
please let me know.  Thanks.

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

        

Reply via email to