today I started working on a binding for openhab2. Since I don’t want to create everything from scratch I would like to add an external dependency via maven.
thanks for the quick response. Could you explain why then the addon bundles all contain a pom file? From my perspective it would be at least useful to include dependencies as osgi bundles instead of using jar files in every addon.
Although I noticed most addons simply do their own implementation of a protocol instead of relying on external libraries.
The build is done with Maven Tycho, which requires OSGi bundles to have a pom in order to be found and picked up by the Maven build. But their content is rather minimal.
This is done whereever possible, but it requires the dependency to be available in some p2 repository. See e.g. all dependencies that are taken from Eclipse Orbit.
Although I noticed most addons simply do their own implementation of a protocol instead of relying on external libraries.
This is clearly the preferred solution, since it keeps the bindings (and thus the runtime) lean and you do not end up deploying half the internet in the end.