Can I force Fuse Fabric Maven Proxy to push an updated version of the same jar to containers

789 views Asked by At

I've developed a project that has a bundle whose only purpose is to write a file to a certain location on all of the containers running it.

This file will change often, but does not really constitute an increase in version number. I also don't want to have 100 versions of this bundle in my repository. So I have left it as a snapshot. This question would also apply if I was doing active development on a project for fuse fabric.

Once built, I deploy the bundle to my fabric's maven proxy with:

mvn deploy:deploy-file -Dfile=target/file-1.0-SNAPSHOT.jar -DartifactId=file -DgroupId=com.some.id -Dversion=1.0.0 -Dtype=bundle  -Durl=http:// username:password@hostname:port/maven/upload

I can then add my bundle to a profile with:

mvn:com.some.id/file/1.0.0

This works the first time.

Then I make a change to the file, rebuild the bundle, and deploy with exactly the same command. I remove the bundle from the profile and add it back in. The maven proxy on the fabric server has the new bundle in it if I check $FUSE_HOME/data/maven/proxy/com/some/id/file/1.0.0/

But on all of the containers running the profile on a separate server, the bundle is not updated. I assume because the version has not changed. However, fabric should be smart enough to tell the difference, as the md5 should be different.

For now I can change the version number and my problem is solved, or clear the maven proxy by hand. But in production I will not be able to clear the proxy on every server, nor can I expect someone to come up with a unique version for the bundle every time they make a small change to this file (which should happen often).

I have already tried adding updatePolicy=always to the fabric maven configuration, but I believe that only affects repositories that it is pulling from, not the proxy.

Any advice on the best way to solve this problem is welcome.

1

There are 1 answers

0
Ramin Arabbagheri On

If you are using containers, your old artefacts must be cached in

$FUSE_HOME/instances/CONTAINER_NAME/data/maven/agent/

Delete the old artefacts from here and stop/start your container.