Adding a Karaf Feature

639 Views Asked by At

To add a "feature" to an instance of Apache Karaf, one option is to use (as described at https://karaf.apache.org/manual/latest/provisioning). What I don't understand, and can't find documented anywhere, is: where does this feature get added behind the scenes?

To clarify, after I repo-add a feature and then shut down Karaf, that feature persists the next time I start up Karaf - even though that feature does not show up in org.apache.karaf.features.repos.cfg. That being the case, how does Karaf know that I've added that feature? Is there another config file somewhere that the feature has gotten added to upon my issuing the repo-add?

1

There are 1 best solutions below

1
On

As noted at http://karaf.apache.org/manual/latest/#_feature_and_resolver, "The features state is stored in the Apache Karaf cache (in the KARAF_DATA folder)." Specifically, that location is found in your Karaf directory at location ...\data\cache. At that location you will find separate directories for each bundle (e.g., \data\cache\bundle123). In each of those directories you will find a file, bundle.info, which contains the path to the maven repository that pertains to that feature.