[
https://issues.apache.org/jira/browse/MSHADE-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16622408#comment-16622408
]
Robert Scholte commented on MSHADE-300:
---------------------------------------
That's the easy question :) Create the sample project under {{src/it}} (have a
look at the others), add an {{invoker.properties}} with
{{invoker.java.version=9+}}, see
[invoker.properties|https://maven.apache.org/plugins/maven-invoker-plugin/run-mojo.html#invokerPropertiesFile]
To verify run {{mvn verify -Prun-its}}
> 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)