Missing JARs for OpenHab core in Maven

Dear all,

I am attempting to write my first own addon and I am afraid I find the documentation a bit lacking. In particular, I am having trouble setting up Maven correctly.

I have set the parent as follows:

  <parent>
    <groupId>org.openhab.addons.bundles</groupId>
    <artifactId>org.openhab.addons.reactor.bundles</artifactId>
    <version>4.2.0-SNAPSHOT</version>
  </parent>

But maven then gives me these kinds of errors:

dependency: org.openhab.core:org.openhab.core:jar:4.2.0 (compile)
[ERROR]         Could not find artifact org.openhab.core:org.openhab.core:jar:4.2.0 in openhab-release (https://openhab.jfrog.io/openhab/libs-release)
[ERROR]         Could not find artifact org.openhab.core:org.openhab.core:jar:4.2.0 in central (https://repo1.maven.org/maven2)
[ERROR] dependency: org.openhab.core:org.openhab.core.thing:jar:4.2.0 (compile)
[ERROR]         Could not find artifact org.openhab.core:org.openhab.core.thing:jar:4.2.0 in openhab-release (https://openhab.jfrog.io/openhab/libs-release)
[ERROR]         Could not find artifact org.openhab.core:org.openhab.core.thing:jar:4.2.0 in central (https://repo1.maven.org/maven2)
[ERROR] dependency: org.openhab.core:org.openhab.core.binding:jar:4.2.0 (compile)
[ERROR]         Could not find artifact org.openhab.core:org.openhab.core.binding:jar:4.2.0 in openhab-release (https://openhab.jfrog.io/openhab/libs-release)
[ERROR]         Could not find artifact org.openhab.core:org.openhab.core.binding:jar:4.2.0 in central (https://repo1.maven.org/maven2)
[ERROR] dependency: org.openhab.core:org.openhab.core.io.net:jar:4.2.0 (compile)
[ERROR]         Could not find artifact org.openhab.core:org.openhab.core.io.net:jar:4.2.0 in openhab-release (https://openhab.jfrog.io/openhab/libs-release)
[ERROR]         Could not find artifact org.openhab.core:org.openhab.core.io.net:jar:4.2.0 in central (https://repo1.maven.org/maven2)

If I interpret this right then the problem seems to be that the metadata is on maven central but the JARs are not?

I guess that can’t be right, I must be missing something. I have also tried multiple versions. I actually would want to build against version 5.

Any advice would be greatly appreciated. There is no readily usable "addon stubā€, is there?

Your dependency is set to snapshot, so it won’t be abailable in maven central and libs-releases (I suppose). Try using version 4.2.0 instead.

Personally I am using these repos in my builds, but I very rarely target OH snapshots:

Yes, here it is.

The problem is you don’t have a clean opehab-addon baseline. Either you copied or cloned the addons-repo approx 1,5 years ago so it’s stuck at version 4.2.

My first advice would be to check the the complete developer setup. After executing this you will have the right tools, the right baseline and the stub for your new binding created.

1 Like