Ask is moving to Stack Overflow and! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode


karaf features installed by default

asked 2015-07-13 10:58:48 -0800

henryf gravatar image

I would like to my integration project generated zip file or tar.gz file to include my karaf features that I would otherwise need feature:install at run-time. It is because I would not like my customers to do feature:install. I would like to provide my customers the zip file and they just unzip it and do bin/karaf. Please kindly advise me how to achieve that. I guess I need to modify a config file in my integration project before doing mvn clean install in my integration project.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-07-13 11:16:14 -0800

jamoluhrsen gravatar image

updated 2015-07-13 17:45:50 -0800

in distributions/karaf/pom.xml, there is a section for bootFeatures. If you add your needed features to that section before building, I think it should do what you want.

to verify, after building the resulting .zip distribution should have your feature listed in the featuresBoot section of the config file: $DISTRIBUTION/etc/org.apache.karaf.features.cfg

when building (mvn clean install in the root directory of the integration repo), the resulting distribution zip will be in distributions/karaf/target/

the other less automatic way, is just to unzip your distribution, modify the above config file, and re-zip.

edit flag offensive delete publish link more


Thanks for the pointer. I tried that out and could not get it working. I added odl-l2switch-all to the bootFeatures section: <bootfeatures> <feature>standard</feature> <feature>odl-l2switch-all</feature> </bootfeatures> However, I did not see $DISTRIBUTION/etc/org.apache.karaf.features.cfg affected by my change at all.

henryf ( 2015-07-13 15:45:39 -0800 )edit

there is another section that you might also need to edit, just below that bootFeatures section. let me know if that doesn't work and I can try locally.

jamoluhrsen ( 2015-07-13 15:50:46 -0800 )edit

Even after I modified the <features> section, there seemed more to be done: [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.1:features-add-to-repository (populate-system) on project distribution-karaf: Error populating repository: Unable to find the feature 'odl-l2switch-all' -> [Help 1] I like the unzip and re-zip work-around you suggested.

henryf ( 2015-07-13 16:16:41 -0800 )edit

I just tried this locally and it works like I first suggested. just adding the one line should be enough. let me update the original answer with more specific steps

jamoluhrsen ( 2015-07-13 17:44:04 -0800 )edit

I just checkout lithium's integration project and followed the steps mentioned, but it is not working. Please let us know, in which version this was working

vikram.darsi ( 2016-01-04 06:41:22 -0800 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-07-13 10:58:48 -0800

Seen: 915 times

Last updated: Jul 13 '15