Reputation: 162
<feature name="featureA" version="1.1.8">
<bundle start-level="80">mvn:org.antlr/antlr4-runtime/4.5.3</bundle>
</feature>
<feature name="featureB" version="1.1.8">
<bundle start-level="80">wrap:mvn:org.antlr/antlr4-runtime/4.0</bundle>
</feature>
I have two features that are using antlr4-runtime, but different versions of it. In runtime classes for antlr are loaded from 4.5.3 version for both features. Can we configure karaf somehow to use one version of same library for one feature and the other for second feature?
Upvotes: 0
Views: 1102
Reputation: 682
You should have a look to the other jars that are in your features. In the manifest file of your jars if you declare a dependency to a package from org.antlr 4.0 that means the version 4.0 is the minimum version that suit so the version 4.5.3 will suit as well. You can have a look to this page if you need more information: osgi-version
Upvotes: 0
Reputation: 4421
There is no need to do explicit configuration for the Karaf container. While constructing a bundle you need to mention the specific versions(antlr bundle) in the consuming bundle(the one which uses). Since karaf(OSGi container) accepts deployment of same bundle with different versions. This is one of the major advantage of OSGI containers.
Upvotes: 2