Search code examples
apache-karaffuseesbjbossfusekaraffabric8

profile-refresh in Fuse 6.2 does not reload snapshot bundle


I am running JBoss Fuse 6.2.0.

I built a small camel application that just writes to the log every 5 seconds. I built it and installed the SNAPSHOT bundle jar in my local Maven repository.

In the Karaf console I did the following:

fabric:profile-create --parent feature-camel logdemo
fabric:profile-edit --bundle mvn:com.company.project/logdemo logdemo
fabric:container-create-child --profile logdemo root child1

The camel application now worked as intended.

I then made a small change to the application, rebuilt it and installed the new SNAPSHOT bundle jar in my local Maven repo.

In the Karaf console I then did the following to get Karaf to load the new jar:

fabric:profile-refresh logdemo

But the loaded application is still the old version.

How do I get Karaf to look for the updated jar in my local maven repo? It seems like it has some internal cache it looks in instead.

Note: We're not using Maven to build the application, so all answers about using Maven plugins like the fabric8 plugin will be rejected.


Solution

  • You should use the fabric:watch * command for that. This will update all containers that run a snapshot version of an artifact that is updated in the local maven repo. If you want only a specific container to watch for updates use dev:watch * on the shell of that container.

    See http://fabric8.io/gitbook/developer.html