shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tuomas Kiviaho (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SHIRO-624) OSGI: commons configuration import should be optional
Date Sat, 26 Aug 2017 19:26:01 GMT

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

Tuomas Kiviaho commented on SHIRO-624:
--------------------------------------

It's been a while when I last time had my hands on the bundle plugin (https://issues.apache.org/jira/browse/FELIX-3565)
codebaseand I still seem to be using a patched version of 2.4.1, but all-n-all I remember
also struggling with a similar issue of classes from dependencies being added to the jar against
my intentions.

I am declaring the OSGi dependencies myself with {{<type>bundle</type>}} in order
to differentiate them from plain old jars that need to be either embedded or extracted into
the jar that you are creating. The effect of that type along with scope and dependency exclusions
should give the functionality as what you were expecting from your dependencies. 

I hope that this approach works because there has been an issue reported that closely related
to my patch (https://issues.apache.org/jira/browse/FELIX-5645)

BTW: One could argue that bundles can contain redundant classes making them sort of fat jars.
This works only when there is a clear package separation between bundles which I don't think
that Shiro yet has although the problem can be circumvented by declaring shiro bundles as
fragments of shiro-core. In every shiro bundle one must see that those packages that are of
foreign origin are declared as Package-Imports or otherwise the classloading doesn't work
as expected. In conclusion I'm very much personally against fat jars. Although they are easy
to setup, they are a pain to live with because BND will see these extra classes and I have
to manually exclude every unwanted package like commons-config2.  

> OSGI: commons configuration import should be optional
> -----------------------------------------------------
>
>                 Key: SHIRO-624
>                 URL: https://issues.apache.org/jira/browse/SHIRO-624
>             Project: Shiro
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: Moritz Bechler
>            Priority: Minor
>
> shiro-core OSGI manifest currently declares the org.apache.commons.configuration2.interpol
import as required.



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

Mime
View raw message