[
https://issues.apache.org/jira/browse/COMPRESS-456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16516877#comment-16516877
]
Stefan Bodewig commented on COMPRESS-456:
-----------------------------------------
Many thanks.
It looks as if we have "broken" this Import-Package back when we started adding
any optional dependencies and if I now change it to what you suggest I get all
the other external dependencies without having to specify them explicitly.
Given how often we've broken the bundle by making honest mistakes fiddling with
Import-Package it is a pity nobody told us to use {{*;resolution:=optional}}
before.
I'll try to see whether we can reuse more of the parent POM's configuration but
will change the settings in either case.
In a way I wonder why this has never come up before. Has {{javax.crypto}} moved
out of the classlib so tat it used to work before or are you the first one
trying to use encrypted 7z archives and OSGi at the same time?
> Missing OSGI Import-Package
> ---------------------------
>
> Key: COMPRESS-456
> URL: https://issues.apache.org/jira/browse/COMPRESS-456
> Project: Commons Compress
> Issue Type: Bug
> Components: Build
> Affects Versions: 1.17
> Reporter: Jérémie Brébec
> Priority: Major
>
> The configuration of the maven-bundle-plugin overrides the <Import-Package>
> directive : "*" is not present anymore, and severals packages do not resolve
> correctly.
> For example, "javax.crypto", which is used by 7z encryption, is not resolved
> and using this feature fails with a ClassNotFoundException on
> javax.crypto.SecretKey.
> ahma I think that the correct Import-Package directive should be :
> {code:java}
> <Import-Package>*;resolution:=optional</Import-Package>{code}
> this directive will import everything commons-compress depends on, but with
> an optional resolution (and so every dependencies will be optionals)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)