Hi Daniel,

you have different options:

1. The cleanest approach is probably to package your blueprint XML in a
bundle (in OSGI-INF/blueprint) and then use regular import package. You
can provision all using karaf features
2. You can drop the jar in the deploy folder. By default, blueprint
deployer creates "on the fly" a bundle with your blueprint XML (that's
why you can see your blueprint when you do bundle:list), using dynamic
import.
3. You can define the third party in lib/ext or startup to make it
available to the whole container.

I can help you if needed for a example.

Regards
JB

On 23/08/2019 14:43, Krenn Daniel wrote:
> 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 <mailto:daniel.kr...@team-con.de>
> 
>       
> 
>  |   Tel. +49 (9931) 981 365
> 
>       
> 
>  
> 
>  
> 
> T.CON GmbH & Co. KG <https://www.team-con.de/>
> T.CON GmbH & Co. KG ​
> ​*www.team-con.de* <http://www.team-con.de/>
>  
> 
> *​*
> <http://www.team-con.de/>Hauptsitz: Straubinger Straße 2 | 94447 Plattling | 
> Tel: *+49 (0)9931 981-100*
> <tel:+499931981100>
> ​​*Events*
> <http://www.team-con.de/unternehmen/news-veranstaltungen/veranstaltungen.html>
>  | *Newsletter*
> <https://www2.team-con.de/newsletter>
> 
> T.CON | Facebook <https://www.facebook.com/TEAMCONde/>        
> T.CON | Twitter <https://twitter.com/team_consulting>
> 
>       T.CON | LinkedIn <https://www.linkedin.com/company/t-con-gmbh-&-co-kg/> 
> T.CON | YouTube <https://www.youtube.com/user/TEAMCONde>
> 
>       T.CON | Instagram <https://www.instagram.com/team.consulting/>  
> T.CON | Xing <https://www.xing.com/companies/t.congmbhco.kg>
> 
>       
> SAP Gold Partner <https://www.sap.com/germany/index.html>
> 
> 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
> 
> iT.CONnect 2019
> <https://www.team-con.de/unternehmen/news-veranstaltungen/veranstaltungen/itconnect.html?utm_source=employee&utm_medium=email&utm_campaign=de_it.connect>
> 

-- 
Jean-Baptiste Onofré
jbono...@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply via email to