What would be the “right” way to include a third party maven dependency in the openhab-core bundle?
I’m developing a PR in a openhab-core bundle (openhab-core/bundles at master · openhab/openhab-core · GitHub) where I depend on a third party maven artifact.
My current assumption is the following:
- I have to declare the dependency in the bundles POM (using provided or compile scope)
- I have to add a Karaf feature to the openhab-tp feature.xml since it seems external dependencies are all kept there (I found none in openhab-core itself). This feature has to include a bundle dependency using "mvn: " notation, referencing my 3rd party maven artifact.
- I have to add “feature dependency” in the feature.xml of openhab-core where the new openhab-tp feature is referenced
- since my 3rd party maven dependency still isn’t found I figured it is not “OSGI ready”, so I forked and updated GitHub - openhab/openhab-osgiify: OSGi-ified versions of openHAB dependencies creating an osgiified version of the 3rd party dependency which I use instead the real one
- Most likely I have to add my Maven dependency to the runtime POM ?
- is that really the right approach?
- is really all of that necessary?
- am I missing something?
- doing all this, the openhab-core karaf-maven-plugin complains about a transitive dependency of my 3rd party dep being missing (ch.qos.logback.classic in that case) - where do I have to make a change? And I guess we don’t really want to have logback being included, so maybe the 3rd party artifact needs to be adapted?
Some clarification or a pointer to some enlightening documentation would be much appreciated.