resilience-core OSGi bundle imports javax.annotation.meta
See original GitHub issueThanks for raising a Resilience4j issue. Please provide a brief description of your problem along with the versions you are using. If possible, please also consider putting together a complete JUnit test that reproduces the issue.
Resilience4j version: 1.10.0
Java version: 8
Problem description:
In the MANIFEST.MF file you import
Import-Package: javax.annotation,javax.annotation.meta
Not sure what you use the javax.annotation.meta
package for, as its not a standard package? Maybe you can remove this
In Apache Camel if we add a osgi feature for this then it fails validating
[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.2.7:verify (validate) on project apache-camel: Verification failures: Verification failures: [ERROR] Feature resolution failed for [camel-resilience4j/3.0.0.SNAPSHOT] [ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=camel-resilience4j; type=karaf.feature; version=3.0.0.SNAPSHOT; filter:=“(&(osgi.identity=camel-resilience4j)(type=karaf.feature)(version>=3.0.0.SNAPSHOT))” [caused by: Unable to resolve camel-resilience4j/3.0.0.SNAPSHOT: missing requirement [camel-resilience4j/3.0.0.SNAPSHOT] osgi.identity; osgi.identity=org.apache.camel.camel-resilience4j; type=osgi.bundle; version=“[3.0.0.SNAPSHOT,3.0.0.SNAPSHOT]”; resolution:=mandatory [caused by: Unable to resolve org.apache.camel.camel-resilience4j/3.0.0.SNAPSHOT: missing requirement [org.apache.camel.camel-resilience4j/3.0.0.SNAPSHOT] osgi.wiring.package; filter:=“(osgi.wiring.package=io.github.resilience4j.bulkhead)” [caused by: Unable to resolve io.github.resilience4j.bulkhead/1.1.0: missing requirement [io.github.resilience4j.bulkhead/1.1.0] osgi.wiring.package; filter:=“(osgi.wiring.package=io.github.resilience4j.core.exception)” [caused by: Unable to resolve io.github.resilience4j.core/1.1.0: missing requirement [io.github.resilience4j.core/1.1.0] osgi.wiring.package; filter:=“(osgi.wiring.package=javax.annotation.meta)”]]]] [ERROR] Repositories: { [ERROR] file:///Users/davsclaus/workspace/camel/platforms/karaf/features/target/classes/features.xml
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (9 by maintainers)
Top GitHub Comments
Any feedback on the PR? I think the PR is a correct solution, it has the following changes:
The only minor disadvantage is that you can’t use a new core bundle with an older other bundle like cache which imports io.github.resilience4j.core.lang - you need to use the new version of cache as well., But as this hasn’t really worked well with old versions in OSGi anyway, I don’t think it’s a problem.
Related to this, I was able to get a bundle that includes the resilience4j jar working with other bundles in a Karaf container via the following Felix block in its pom.xml. I’m not an expert on OSGi so perhaps I’ve been a little too wide on the import side. But at least the other bundles are able to consume this without knowledge of these jars now.