Problem with dependencies when building addon for OH 2.5.x

Hi,

I’m trying currently to re-build an existing add-on for OH 2.5.x.
So I have downloaded the openhab-addons-2.5.x repository and tried to build the NUKI binding with the command mvn clean install executed in the according directory of the add-on.

When building the addon it seems maven cannot resolve some of the dependencies.
I.e. it seems that on https://openhab.jfrog.io/artifactory/libs-release the needed deps to the core are no longer available.

[ERROR] Failed to execute goal on project org.openhab.binding.nuki: Could not re
solve dependencies for project org.openhab.addons.bundles:org.openhab.binding.nu
ki:jar:2.5.13-SNAPSHOT: org.openhab.core.bom:org.openhab.core.bom.openhab-core:p
om:2.5.0 was not found in https://openhab.jfrog.io/openhab/libs-release during a
 previous attempt. This failure was cached in the local repository and resolutio
n is not reattempted until the update interval of openhab-release has elapsed or
 updates are forced -> [Help 1]

So I downloaded also the openhab-core-2.5.x repsoitory and tried to build it first to install the according dependencies into the maven repos, but also here the build process fails:

[ERROR] Failed to execute goal on project org.openhab.core.io.transport.dbus: Co
uld not resolve dependencies for project org.openhab.core.bundles:org.openhab.co
re.io.transport.dbus:jar:2.5.0: The following artifacts could not be resolved: d
e.maggu2810.dbus:dbus:jar:2.7.0, de.maggu2810.libmatthew:unix:jar:0.5.0: de.magg
u2810.dbus:dbus:jar:2.7.0 was not found in https://openhab.jfrog.io/openhab/libs
-release during a previous attempt. This failure was cached in the local reposit
ory and resolution is not reattempted until the update interval of openhab-relea
se has elapsed or updates are forced -> [Help 1]

Can anyone help me on what is the easiest way to re-build an existing add-on for OH 2.5.x?

What I want to achieve is to rebuild the NUKI binding as the current implementation uses the unsecure token for authentication and I would like to change the implementation in a way to be able to also use hashed tokens, which is now also supported by the NUKI smart lock.

Thanks a lot in advance for your help :slight_smile:

1 Like

jfrog has been shut down. I doubt you can successfully build a binding for 2.5 any longer.

You can go to Index of libs-release/ and browse downwards and check what is available in the repo. As far as I understand Bruce is right 2.5.X related items are not there.
Nevertheless I think to remember that I saw a post where it was described a dependency ( most probably for a 3.X.X binding ) was missing and that one was added on based on that request.

1 Like

I got pretty far, I’m currently only missing the following dependencies:

[ERROR]         Error downloading mvn:de.maggu2810.thirdparty.modified.io.swagger/swagger-jersey2-jaxrs/1.5.8.v20160511-1038
[ERROR]         Error downloading mvn:de.maggu2810.thirdparty.modified.com.eclipsesource.jaxrs/provider-swagger/1.1.1.201605111122
[ERROR]         Error downloading mvn:de.maggu2810.thirdparty.modified.org.reflections/reflections/0.9.10.v20160429-1435.

I believe that I can build the openhab-target-platform when I have those, after that I think we (also) have evertything needed to build OH2.5 add ons.

I did e-mail @maggu2810 whether he still has those dependencies present and I hope that he has them somewhere. If I hear back from him and were able to publish the needed dependencies somewhere I will let you know.

Excellent @martinvw that sounds very good.
Thanks a lot!

Kai was able to publish the files this evening. I’m currently running a build with a blank maven repository it seems I delivered some incorrect sha1 hashes to Kai but the rest looks good.

I also see errors when building bindings with serial connections, so for that, I will do a follow-up.

There are two modules which do not yet build at all, but I will spend some more time on that later.

  • org.openhab.binding.groheondus
  • org.openhab.io.mqttembeddedbroker

PS: will also try to fix the hashes.

The concrete meaning of the exception depends on the plugin so please have a look at its documentation!