简体   繁体   中英

opendaylight: how to include a library jar file?

I am developing a feature (consisting of bundles) for Opendaylight Carbon.

I want to include a third party jar (libary) in my feature. How can I do this? I don't want to include it as a bundle - just as a jar file library that is linked to my bundle.

I don't want to bundle this third party jar. I just want to include it such that it is resolvable by MY bundle. Thanks.

You cannot both not "want to include it as a bundle" NOR "want to bundle this third party jar". How / where from do you expect OSGi (Karaf) to load the classes from your third party JAR then?!

But bundling is perhaps more easy than you may think, because the maven-bundle-plugin (together with BND which it internally uses) basically can do all the hard work for you if you nicely ask it to via Embed-Dependency .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM