[ 
https://issues.apache.org/jira/browse/MSHADE-385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800472#comment-17800472
 ] 

Uwe Schindler commented on MSHADE-385:
--------------------------------------

Hi,
Please reopen this issue and fix it correctly.

Maven Shade should automatically enable the multi release manifest entry if one 
of the original source jar files have it enabled.

In Lucene we get questions and users open issues all the time when they use 
Maven Shade / Assembly plugins. Apache Lucene uses the Multi-Release JAR file 
feature extensively (in addition to Service Provider files and Java Modules).

As somebody managing the pom file with dependencies has no idea if one of the 
dependencies uses a multi release JAR, there should be support in the tooling. 
The use can't know this.

P.S.: if you shade a jar, any module-info.class files should be removed, too, 
because uber-jars cannot be modules anymore. Not sure if this is already fixed.

A summary of all issues people fight with can be found here: 
https://github.com/apache/lucene/issues/12307#issuecomment-1803320694 (this 
issue was not about Maven, but we refer to this comment on all opened issues 
about this).
Uwe

> Support for Multi-Release-JARs
> ------------------------------
>
>                 Key: MSHADE-385
>                 URL: https://issues.apache.org/jira/browse/MSHADE-385
>             Project: Maven Shade Plugin
>          Issue Type: New Feature
>    Affects Versions: 3.3.0
>            Reporter: Markus Karg
>            Priority: Major
>
> Maven Shade Plugin currently is unable to deal with multi-release JARs, hence 
> it always (and only) picks the lowest commen nominator (fallback) class.
>  
> Actually the plugin should instead produce a multi-release JAR, hence pick 
> all class versions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to