You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2018/09/19 17:47:00 UTC
[jira] [Commented] (MSHADE-300) Allow retention of module-info
class by property
[ https://issues.apache.org/jira/browse/MSHADE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16620943#comment-16620943 ]
Robert Scholte commented on MSHADE-300:
---------------------------------------
I think this is an acceptable option. Probably should add a small integrationtest to confirm that the parameter is picked up correctly.
> Allow retention of module-info class by property
> ------------------------------------------------
>
> Key: MSHADE-300
> URL: https://issues.apache.org/jira/browse/MSHADE-300
> Project: Maven Shade Plugin
> Issue Type: New Feature
> Affects Versions: 3.2.0
> Reporter: Rafael Winterhalter
> Priority: Major
> Attachments: MSHADE300.patch
>
>
> Currently, the shader removes any module-info.class file that is found during the shading process. This makes perfect sense as the integrity of the module-info class file breaks as a result of the relocation and any potential renaming.
> Many library vendors that use the shade plugin do so to import minor dependencies into their namespace. In my case, I depend on ASM and use another Maven plugin to generate a module-info.class file which does not require ASM and would work correctly. Unfortunately, this working module-info.class file is filtered out by the shade plugin.
> To overcome this limitation, I suggest adding a 'retainModuleInfo' property that allows for the retention of the module-info.class file that is extracted from the main artifact. I understand that this might be an edge case but given the module system only being partially adopted it would help some low-level library vendors like myself a lot if this feature would be included in the plugin.
> I have attached a patch file that implements this feature and it only requires minimal changes in the plugin. I have also validated that this feature works for my project (Byte Buddy).
> If you could merge and release this extension, I would hope to include module descriptors in Byte Buddy in the upcoming Java 11-compatible release. Thanks a lot!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)