[jira] [Comment Edited] (SHIRO-632) org.apache.felix:maven-bundle-plugin causing duplicate class problems between core and lang

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[jira] [Comment Edited] (SHIRO-632) org.apache.felix:maven-bundle-plugin causing duplicate class problems between core and lang

JIRA jira@apache.org

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

Joerg Schoenfisch edited comment on SHIRO-632 at 7/20/17 9:05 AM:
------------------------------------------------------------------

The maven-bundle-plugin duplicates all classes from the Maven dependencies of shiro-core that reside under {{org.apache.shiro*}}, as specified in <Export-Package>. As far as I understand the bundle-plugin, not all of these dependencies can be excluded, as for example both shiro-core and shiro-config-core define the package {{org.apache.shiro.config}} and there is no way to distinguish between those two (class-level exclusion seems not to be possible, and is cumbersome and error-prone anyway).
For me it looks like the only proper fix is to define a unique top-level package for each module.

To fix source code attachments in IDEs, a workaround would be to do the same duplication for the source.jar, however, this does not fix the conflicts for duplicate classes reported by the maven-enforcer-plugin, as reported on the mailing list.


was (Author: joerg776):
The maven-bundle-plugin duplicates all classes from the Maven dependencies of shiro-core that reside under {{org.apache.shiro*}}, as specified in <Export-Package>. As far as I understand the bundle-plugin, not all of these dependencies can be excluded, as for example both shiro-core and shiro-config-core define the package {{org.apache.shiro.config}} and there is no way to distinguish between those two (class-level exclusion seems not to be possible, and is cumbersome and error-prone anyway).
For me it looks like the only proper fix is to define a unique top-level package for each module.

To fix source code attachments in IDEs, a workaround would be to do the same for the source.jar, however, this does not fix the conflicts for duplicate classes reported by the maven-enforcer-plugin, as reported on the mailing list.

> org.apache.felix:maven-bundle-plugin causing duplicate class problems between core and lang
> -------------------------------------------------------------------------------------------
>
>                 Key: SHIRO-632
>                 URL: https://issues.apache.org/jira/browse/SHIRO-632
>             Project: Shiro
>          Issue Type: Bug
>            Reporter: Brian Demers
>
> Possibly other conflicts, but without knowing much about the maven-bundle-plugin it looks like we should be able to exclude the in tree shiro dependencies.
> https://felix.apache.org/documentation/subprojects/apache-felix-maven-bundle-plugin-bnd.html#export-package
> Reported on the user mailing list title: Maven sources missing / duplicate classes



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
Loading...