Hi Guys,
I’m a new Java programmer (I hava 15+ years of experience in C and other languages) and I’m experiencing some problem building my first binding.
Everything seems working with the eclipse demo app and I can debug my code, but, once I change the item state the OFF command is not sended to my channel (ON command is sent and handled properly indeed).
Taking a look here: Strange behaviour of handleCommand function in my plugin - Development / Add-ons - openHAB Community seems that is a problem related to the debug with eclipse.
So, my idea is to setup a demo server and install my binding. So I run
mvn clean install
in my command prompt and it cannot resolve dependencies.
My pom.xml looks like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>4.1.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.binding.threadcoap</artifactId>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.eclipse.californium/californium-core -->
<dependency>
<groupId>org.eclipse.californium</groupId>
<artifactId>californium-core</artifactId>
<version>2.7.4</version>
<scope>compile</scope>
</dependency>
</dependencies>
<name>openHAB Add-ons :: Bundles :: ThreadCoap Binding</name>
</project>
and the error from mvn is:
[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.4.3:verify (karaf-feature-verification) on project org.openhab.binding.threadcoap: Feature resolution failed for [openhab-binding-threadcoap/4.1.0.SNAPSHOT]
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-threadcoap; type=karaf.feature; version=4.1.0.SNAPSHOT; filter:="(&(osgi.identity=openhab-binding-threadcoap)(type=karaf.feature)(version>=4.1.0.SNAPSHOT))" [caused by: Unable to resolve openhab-binding-threadcoap/4.1.0.SNAPSHOT: missing requirement [openhab-binding-threadcoap/4.1.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.binding.threadcoap; type=osgi.bundle; version="[4.1.0.202308241730,4.1.0.202308241730]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.threadcoap/4.1.0.202308241730: missing requirement [org.openhab.binding.threadcoap/4.1.0.202308241730] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.eclipse.californium.core)(version>=2.7.0)(!(version>=3.0.0)))"]]
Edit: Sorry, mispressed submit too early :D.
Anyway, does anyone has any idea about the solution?