Ask Your Question
0

Why recompile opendaylight-karaf for changes in another plugin to take effect?

asked 2015-06-11 12:42:40 -0700

jeffcavalcante gravatar image

updated 2015-06-11 12:43:31 -0700

I have now a set of plugins. When I change code in one of them, i have to recompile it and recompile the opendaylight-karaf (my bundles are in its set of dependencies) for changes to take effect.

It was not like that weeks ago. Is there a way to avoid recompiling the entire karaf for changes in plugins to take effect?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-06-12 10:07:28 -0700

There are couple of things you could try:

  • Shutdown Karaf, delete the content of the karaf/data folder and restart (after recompiling your module).
  • Use the command bundle watch on a specific bundle
  • Uninstall / reinstall the feature / bundle
edit flag offensive delete publish link more

Comments

Unfortunatelly, none of these seemed to update the recently compiled JARs, and I had to replace them manually. However, I noticed that if we change the POM (eg. add a dependency), cleaning the data directory after replacing the JAR is also necessary. Thanks for this.

jeffcavalcante ( 2015-06-18 10:42:16 -0700 )edit
0

answered 2015-06-18 10:35:17 -0700

jeffcavalcante gravatar image

Here's the 2 steps that worked for me:

1- Manually copy the updated JARs from local maven repository to karaf's system (controller/karaf/opendaylight-karaf/target/assembly/system) directory. This allows the updated code to be installed. Before replacing the JARs, I uninstall the feature (feature:uninstal) and restart karaf. If dependencies change, for example, the step 2 is required.

2- Cleaning the karaf's data (controller/karaf/opendaylight-karaf/target/assembly/data) directory. Thanks to grmontpetit for this.

Bundle watch didn't work properly for me (I noticed when debugging), that's why I'm replacing JARs manually.

edit flag offensive delete publish link more
Login/Signup to Answer

Stats

Asked: 2015-06-11 12:42:40 -0700

Seen: 190 times

Last updated: Jun 18 '15