Using MQTT client in a binding

Hello!
I decided to work on iRobot Roomba binding, which does not require an MQTT server and Python bridge. I am using Python library as a reference.
It turns our Roomba is also using MQTT internally. It contains own server, and we only need to do some extra magic to discover username and password. I was able to successfully implement that magic: https://github.com/Sonic-Amiga/openhab2.roomba
And now i’m running into a problem adding MQTT client. I am looking at how our generic MQTT binding does that and using org.eclipse.smarthome.io.transport.mqtt.MqttBrokerConnection. Everything compiles well, but when i try to resolve app.bndrun i get an error:
Resolution failed. Capabilities satisfying the following requirements could not be found:
[<>]
⇒ osgi.identity: (osgi.identity=org.openhab.binding.irobot)
⇒ [org.openhab.binding.irobot version=2.5.1.202003091147]
⇒ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.smarthome.io.transport.mqtt))
⇒ [org.openhab.core.io.transport.mqtt version=2.5.0]
⇒ osgi.wiring.package: (&(osgi.wiring.package=com.hivemq.client.mqtt.datatypes)(&(version>=1.1.0)(!(version>=2.0.0))))
⇒ [com.hivemq.client.mqtt version=1.1.2]
⇒ osgi.wiring.package: (&(osgi.wiring.package=dagger))
Just to verify that everything is OK i try to rebuild and add mqtt-generic into the test environment. The same happens with it.
What am i doing wrong ?

Your feature.xml file where you define openhab-binding-irobot needs one additional line beside openhab-runtime-base:

    <feature>openhab-transport-mqtt</feature>

Not sure how it looks from bnd point of view, but this is all you need from packaging point of view.

Tried that and it didn’t work.
Meanwhile i’ve googled out a solution. Described in the end of this thread:


Apparently there’s something non-standard with packaging of dagger, so the resolve process needs hints. @hilbrand acknowledged this.