Krenn,

I believe that Karaf „feature.xml” is what you looking for 
(https://karaf.apache.org/manual/latest/provisioning).
I use Gradle + https://github.com/lburgazzoli/gradle-karaf-plugin but I’m sure 
there is a plugin for Maven as well.

Kind regards,
Kamil


Od: Krenn Daniel
Wysłano: piątek, 23 sierpnia 2019 14:43
Do: user@karaf.apache.org
Temat: Best practice for deploying beans to use in camel blueprints

Hello!

We have several blueprint XMLs in our Karaf’s deploy directory. We now need to 
use beans in those blueprints.
How do I best make my beans available to the blueprints inside of our Karaf’s 
deploy directory?

Currently, I just mvn clean install my project where I develop my beans. This 
gives me a JAR file which I can drop in the deploy folder. This way, I can 
access my beans.
I just don’t know how to handle dependencies this way. 

For example, I need the apache-commons library. I have declared this dependency 
in my POM.xml, like

<dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.4</version>
</dependency>

But inside Karaf, the dependency doesn’t seem to be available, as I’m getting 
some ClassNotFound exceptions.
I tried to use the maven-assembly-plugin with “jar-with-dependencies”, in order 
to just bundle all dependencies with my project, but that yields a JAR file 
over 50MB in size. I do have a high number of dependencies. When I try to 
deploy that, Karaf just crashes.

Does anyone know a better approach?

Best regards,
Daniel Krenn
Consultant Manufacturing Execution
daniel.kr...@team-con.de

 |   Tel. +49 (9931) 981 365

 


T.CON GmbH & Co. KG ​
​www.team-con.de
 


​Hauptsitz: Straubinger Straße 2 | 94447 Plattling | Tel: +49 (0)9931 981-100
​​Events | Newsletter



















Geschäftsführer: Karl Fuchs, Michael Gulde, Stefan Fiedler | KG: AG Deggendorf 
HRA 1618 
Pers. haftender Ges.: T.CON Beteiligungs-GmbH | Sitz: Plattling | AG Deggendorf 
HRB 2053










Reply via email to