I’m trying to add an external library (for the moment only the library org.apache.commons.cli ) to the OpenHAB core project. I have already imported the library locally into the module that needs it. My code compiles but when I try to maven the bundle with mvn clean install it cannot find the library and the used functions of the library (so an error occurs).
How can I add a library in a bundle? It is explained here in the openhab documentation but I can’t get it to work.
Can someone explain to me what exactly I need to add in the bundle pom.xml and in the feature.xml?
The library is already installed but not configured with the bundle, could someone help me?
First you need to decide whether other bindings would be likely to use this dependency (feature.xml) or whether it is likely to remain only for this binding (pom.xml with compile scope).