I’ve upgraded to openHab 3 and I’m trying to build my Awair binding for this version. I’m stuck on this error that appears right at the end. Do I need to get the latest snapshot for it to work?
[WARNING] The POM for org.openhab.core.bom:org.openhab.core.bom.compile:pom:3.0.0-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.openhab.core.bom:org.openhab.core.bom.openhab-core:pom:3.0.0-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.openhab.core.bom:org.openhab.core.bom.test:pom:3.0.0-SNAPSHOT is missing, no dependency information available
[ERROR] Failed to execute goal on project org.openhab.binding.awair: Could not resolve dependencies for project org.openhab.addons.bundles:org.openhab.binding.awair:jar:3.0.0-SNAPSHOT: The following artifacts could not be resolved: org.openhab.core.bom:org.openhab.core.bom.compile:pom:3.0.0-SNAPSHOT, org.openhab.core.bom:org.openhab.core.bom.openhab-core:pom:3.0.0-SNAPSHOT, org.openhab.core.bom:org.openhab.core.bom.test:pom:3.0.0-SNAPSHOT: Failure to find org.openhab.core.bom:org.openhab.core.bom.compile:pom:3.0.0-SNAPSHOT in https://openhab.jfrog.io/openhab/libs-snapshot was cached in the local repository, resolution will not be reattempted until the update interval of openhab-snapshot has elapsed or updates are forced ->
That generates new errors, I guess because the rest of the bundles are at 3.0.0:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.openhab.addons.bundles:org.openhab.binding.awair:3.2.0-SNAPSHOT: Could not find artifact org.openhab.addons.bundles:org.openhab.addons.reactor.bundles:pom:3.2.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 11
@
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.openhab.addons.bundles:org.openhab.binding.awair:3.2.0-SNAPSHOT (E:\Documents\Programming\OpenHab\openhab-3.0.0.0\git\openhab-addons\bundles\org.openhab.binding.awair\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.openhab.addons.bundles:org.openhab.binding.awair:3.2.0-SNAPSHOT: Could not find artifact org.openhab.addons.bundles:org.openhab.addons.reactor.bundles:pom:3.2.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
Clean install...
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.openhab.addons.bundles:org.openhab.binding.awair:3.2.0-SNAPSHOT: Could not find artifact org.openhab.addons.bundles:org.openhab.addons.reactor.bundles:pom:3.2.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 11
In the end I had to reinstall Eclipse and pull down the latest bundle snapshot. Then I got it to compile. There’d been a lot of moving around of the furniture, what with modified dependencies and so on, so I had to change quite a bit of the code to get it compiled OK.
Now my problem is, when the binding is deployed (having cleaned the cache first), I get this in the log:
2021-07-28 14:37:33.421 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.awair-3.2.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.awair [29]
Unresolved requirement: Import-Package: org.openhab.core.cache
at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.16.200.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:440) ~[org.eclipse.osgi-3.16.200.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.8]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.8]
I haven’t been able to find a solution here. Any hints?
The only reference I can find to the error on the forum is with reference to a compatibility layer for add-ons from previous versions, but that shouldn’t apply here, since it’s an OH3 version of the binding.