[SOLVED] How do I build openhab1 addons?

I tried to do some testing on CalDav Issue which is one of the issues preventing M2 and therefor wanted to build it.

I got a clean copy of openhab1-addons and tried to build it (first only the binding, second all addons) with mvn clean install

When building all addons I get

[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: org.openhab.core1 1.14.0.qualifier
[ERROR] Missing requirement: org.openhab.core1 1.14.0.qualifier requires ‘package javax.servlet 0.0.0’ but it could not be found

When building just org.openhab.io.caldav I get

[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: org.openhab.io.caldav 1.14.0.qualifier
[ERROR] Missing requirement: org.openhab.io.caldav 1.14.0.qualifier requires ‘package com.google.common.collect 0.0.0’ but it could not be found

Do I have to do anything before compiling or am I missing any mvn flags?

I had the same issue and resolved it by using an older Maven version, see also:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=546463
https://issues.apache.org/jira/browse/MNG-6642

Pefect, that pefectly solved my problem.

TLTR: Solution was that there is a problem with maven 3.6.1 (which is reported in the link, so likely solved in a later release) which does not occur in maven 3.6.0

1 Like

It’s also working with 3.6.2-SNAPSHOT which I just tested because it’s taking so long to be released.

The Maven snapshot binaries can be downloaded from this Jenkins build.

The binaries to use are named:

  • apache-maven-3.6.2-20190809.141505-60-bin.tar.gz
  • apache-maven-3.6.2-20190809.141505-60-bin.zip

Using those snapshots is a bit on the risky side of course and YMMV. :angel:

2 Likes

Looks like Maven 3.6.2 with the fix finally got released. :slight_smile:

1 Like