Search code examples
javamavenfuseesbjbossfusefabric8

Fabric8 (Fuse ESB 6.1) strategy for deploying profile based on features


I have an application currently deployed on Karaf 2.3.3 using feature deploys (and KAR alternative). Since I'm now trying out fabric8 I need some advice creating profiles using the maven plugin.

Should I create a profile based on the already existent profiles I've made for the project? Or should I package the bundles into a profile?

I'm running into problems when deploying either way. Just a fraction of the error log:

  io.fabric8.agent.utils.MultiException: Error while downloading artifacts
  at io.fabric8.agent.utils.AgentUtils$ArtifactDownloader.await(AgentUtils.java:314)
  at io.fabric8.agent.DeploymentBuilder.download(DeploymentBuilder.java:160)
  at io.fabric8.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:503)
  at io.fabric8.agent.DeploymentAgent$2.run(DeploymentAgent.java:252)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:744)
java.io.IOException: Error downloading mvn:com.xxx.services.features/xxx-cassandra-feature/0.3.0-SNAPSHOT

Solution

  • What Maven plugin? Is is the fabric8 plugin you refer to? http://fabric8.io/#/site/book/doc/index.md?chapter=mavenPlugin_md

    You can just create a profile using the hawtio, where you can assign Karaf features / OSGi bundles and whatnot.

    And then create a container with this profile, to have a JVM running this stuff.

    And most often maven coordinates is used for downloading the code/JARs. The error you posted above indicate there is a problem downloading from the maven repositories defined.

    But the fabric8 maven plugin is easier, as you just use it to create the profile, and upload your code/project to the maven server (proxy) that is built-in fabric.

    The quickstart examples that comes with the ESB has the fabric8 plugin in their pom.xml you can enable and use as a sample.

    Notice this requires latest build of fabric/Fuse ESB as the maven plugin is rather new.