in OH3 dependecy bundles for a binding where included in the binding jar: for example the bundle openwebnet4j-x.y.z.jar was included in the openwebnet binding jar at build time.
It looks like if I now build the binding in OH4, the dependendcy is not included anymore in the jar causing the loading of the binding to fail if put it in the addons folder.
Is this a wanted change? If yes, where was it described/announced?
I would suspect here changes caused by BND behavior. If you have same POM and same dependency declaration but different contents of generated bundle then, in my humble opinion, blame goes to bnd-maven-plugin, or change in its configuration.
I have no explanation why you don’t have the lib included. I compiled the binding when writing my previous answer and that build had the library included in the 4.0.0 branch.
For the kar file It’s also strange. Kar files are only relevant if the dependencies are specified in the feature file. That isn’t the case here. Therefore I don’t understand why a kar file would work. Unless the library code is included in the kar version. But that would be strange on why it won’t be available in the jar file. Did you check the openHAB automatic build version if that contains the library?
I might have the same issue, but it might also be my inexperience with the dependency system.
Trying to build the xmmplclient to create a testable JAR.
I created the build, dropped it in the addons fodler and it cannot start due to missing dependency. I would have thought that while dropping the jar, the dependency would have been satisfied by karaf.
I can confirm that after a full re-build (mvn clean install), both the generated jar and kar files contain the classes of the dependency lib which is declared with scope compile.
So it may have been a temporary glitch perhaps in the interaction between BND and Eclipse…