0

Please see the image first.

i have multiple instance of apache-karaf, when i change something in my java-project i deploy the jar file inside deploy folder of karaf, and this not good because i have to do that for all instance. now i dont know very well apache-karaf. i saw that it's easy to use feature, so i create features.xml in deploy folder.

example.


mvn:org.apache.commons/com.springsource.org.apache.commons.logging/1.1.1 mvn:org.springframework/spring-core/3.1.1.RELEASE

what i want to do, is when i deploy a new jar in my local maven repository and when i change version of org.springframework/spring-core/ to 4.1.1.RELEASE in features.xml for example, i want that karaf download this modification whitout my intervention. is karaf able to download new depnedencies and delete the older alone? if it's not clear you can ask me question.

enter image description here

Caroline
  • 21
  • 5

1 Answers1

0

You can use Apache Karaf Cellar and Apache Karaf Cave for this scenario. Apache Karaf Cellar brings "farming" to Karaf, in this scenario you can configure multiple karaf instances within one group.

Apache Karaf Cave is a central Repository which can be used to provide all required Bundles to Karaf instances.

Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22
  • Karaf cellar and karaf cave gives you centralized dependencies management, but you still have to do a manual operation to force deployment. You can give a look at the ``bundle:watch`` command (http://karaf.apache.org/manual/latest/#_watch) that watch the maven repositories and automatically install new bundle version. Note that this is a developper feature and is currently only watching SNAPSHOT changes, but it should be easier to adapt it to your case. – Alexandre Cartapanis May 06 '16 at 06:53
  • thanks Alexandre and Achim. so i installed karaf with cellar, cave. i looked to servicemix and i think it's a good idea but i'm not able to view far. i encounter antoher problem related to the same it's when i update my file features.xml (juste version insted of v3 i choose 4.2.5.RELEASE) and karaf can't download it. i have this log : Caused by: java.lang.Exception: Unable to create resource for bundle mvn:org.springframework/spring-beans/4.2.5.RELEASE – Caroline May 06 '16 at 09:16
  • @Caroline best to ask those questions on the related mailinglist, you'll get a much better feedback there. – Achim Nierbeck May 06 '16 at 11:07