fabric:profile-refresh and fabric:watch doesn't work with Fuse 6.3

577 views Asked by At

I'm using Jboss Fuse 6.3. I have created a fabric environment with 2 child container. I have assigned one test profile to one of the container. I'm trying to refresh my profile as I have to updated some of the bundles which are part of my test profile.

To do this I login to fabric console and executed fabric:profile-refresh test-profile

But when I see the bundle's header Bnd-LastModified then it seems not updated and referring the old one only.

I tried with fabric:watch * command as well but no luck.

Can anyone help here?

1

There are 1 answers

1
Grzegorz Grzybek On BEST ANSWER

Short answer: If your bundle is non-SNAPSHOT then there's no attempt to fetch "newer" released version. For maven each non-SNAPSHOT is immutable.

Longer answer: If by I have to updated some of the bundles you mean mvn clean install new version to your ~/.m2/repository, then it should be picked up by Fuse - assuming that ~/.m2/repository is one of your default repositories - please check org.ops4j.pax.url.mvn PID, org.ops4j.pax.url.mvn.defaultRepositories property.

If however you want Fuse to download newer version of non-SNAPSHOT artifact from some remote repository (Nexus, Artifactory, ...), then a version in local repository is preferred. By default, in Fuse 6.3, this local repository is in $FUSE_HOME/data/repository. There's special option in org.ops4j.pax.url.mvn PID called org.ops4j.pax.url.mvn.updateReleases that allows you to set non canonical Maven behavior to actually update non-SNAPSHOTs.

In fabric mode (which you're using) it's a bit more complex.

There is fabric-agent configuration of maven resolver in io.fabric8.agent PID and org.ops4j.pax.url.mvn.* properties - their meaning is the same as org.ops4j.pax.url.mvn PID and org.ops4j.pax.url.mvn.* properties in standalone mode.

In order to verify how Maven resolution works, you can uncomment these log settings in karaf profile:

# help with identification of maven-related problems with fabric-maven
#log4j.logger.org.eclipse.aether = TRACE
#log4j.logger.org.apache.http.headers = DEBUG
#log4j.logger.io.fabric8.maven.util = TRACE
#log4j.logger.io.fabric8.maven.url = TRACE
#log4j.logger.io.fabric8.agent.download = DEBUG

Also please read my articles about pax-url-aether and Maven in general: