[
https://issues.apache.org/jira/browse/MSHADE-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17150238#comment-17150238
]
Rafael Winterhalter commented on MSHADE-373:
--------------------------------------------
I would not see how this is possible. The problem here is that the
ManifestTransformer is applied on any shaded artifact. If you want to add a
bundle name to the manifest, this is the only place where the manifest.mf file
can be transformed. Since the bundle name must be unique, it cannot be present
in the non-shaded jar, however and must neither be present in the source jar.
If the transformer is added, the manifest entry - which is required to be
unique - is however applied to the shaded source jar and the original jar. I
don't see a way to apply it to only one of the two artifacts what is what one
would require if shading and supporting OSGi.
> Source transformation on source jar can break OSGi resolution due to
> duplicated bundle name.
> --------------------------------------------------------------------------------------------
>
> Key: MSHADE-373
> URL: https://issues.apache.org/jira/browse/MSHADE-373
> Project: Maven Shade Plugin
> Issue Type: Improvement
> Affects Versions: 3.2.4
> Reporter: Rafael Winterhalter
> Priority: Critical
>
> Manifest transformers in the shade plugin are often used to add meta-data for
> OSGi use since the shade and OSGi plugins are not overly compatible. If the
> same transformer is applied to the source plugin's manifest, the resolution
> will fail due to a duplicate bundle id.
> It is therefore necessary to being able to opt-out of the manifest
> transformer when shading a source file.
> Pull request: [https://github.com/apache/maven-shade-plugin/pull/59]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)