<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?
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.