Working on a new ddwrt plugin. trying to build it on ssh. The two ssh client libs I tried seem to depend on deprecated packages
jsch seems to be most popular but it depends on org.newsclub.net.unix which I can’t resolve
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-ddwrt; type=karaf.feature; version=4.3.4.SNAPSHOT; filter:="(&(osgi.identity=openhab-binding-ddwrt)(type=karaf.feature)(version>=4.3.4.SNAPSHOT))" [caused by: Unable to resolve openhab-binding-ddwrt/4.3.4.SNAPSHOT: missing requirement [openhab-binding-ddwrt/4.3.4.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.binding.ddwrt; type=osgi.bundle; version="[4.3.4.202503102229,4.3.4.202503102229]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.ddwrt/4.3.4.202503102229: missing requirement [org.openhab.binding.ddwrt/4.3.4.202503102229] osgi.wiring.package; filter:="(osgi.wiring.package=org.newsclub.net.unix)"]]
feature.xml:
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.ddwrt-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<feature name="openhab-binding-ddwrt" description="ddwrt Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle dependency="true">mvn:com.github.mwiede/jsch/0.2.23</bundle>
<bundle dependency="true">mvn:org.bouncycastle/bcprov-jdk18on/1.80</bundle>
<bundle dependency="true">mvn:org.newsclub.net/junixsocket/1.3</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.ddwrt/${project.version}</bundle>
</feature>
</features>
tried apache sshd which is used by eclipse but ran into issue with sun.security.x509 see The net.i2p.crypto.eddsa 0.3.0 bundle has bad OSGi metadata · Issue #15 · eclipse-orbit/orbit-simrel · GitHub
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.ddwrt-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<feature name="openhab-binding-ddwrt" description="ddwrt Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle dependency="true">mvn:org.apache.sshd/sshd-osgi/2.15.0</bundle>
<bundle dependency="true">mvn:net.i2p.crypto/eddsa/0.3.0</bundle>
<bundle dependency="true">mvn:sun.security.x509</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.ddwrt/${project.version}</bundle>
</feature>
</features>
splatch
(Łukasz Dywicki)
March 12, 2025, 4:28am
2
Metadata can be amended with wrap protocol (wrap:mvn:…), see:
<bundle>wrap:mvn:org.apache.plc4x/plc4j-api/${plc4x.version}$Bundle-SymbolicName=org.apache.plc4x.plc4j-api&overwrite=merge&Import-Package=!java.*,org.slf4j;version=1.7,*</bundle>
</feature>
<feature name="plc4j-spi" description="Apache PLC4X SPI" version="${plc4x.version}">
<feature prerequisite="true">wrap</feature>
<feature>plc4j-api</feature>
<feature>plc4j-netty</feature>
<feature>plc4j-shared-deps</feature>
<bundle>mvn:commons-codec/commons-codec/1.15</bundle>
<bundle>wrap:mvn:org.apache.plc4x/plc4j-spi/${plc4x.version}$Bundle-SymbolicName=org.apache.plc4x.plc4j-spi&overwrite=merge&Import-Package=!java.*,com.fasterxml.jackson.*;resolution:="optional",*</bundle>
<bundle>wrap:mvn:org.apache.plc4x/plc4j-osgi/${plc4x.version}$Bundle-SymbolicName=org.apache.plc4x.plc4j-osgi&overwrite=merge&Import-Package=!java.*,*</bundle>
<bundle>mvn:io.vavr/vavr/0.10.4</bundle>
<!-- <bundle>mvn:io.vavr/vavr-match/0.10.4</bundle>-->
</feature>
<feature name="plc4j-shared-deps" version="${plc4x.version}" hidden="true">
<feature>plc4j-commons-lang</feature>
<bundle>mvn:com.github.jinahya/bit-io/1.4.3</bundle>
Its important to mark wrap protocol feature as a prerequisite, once you do that with few (hundreds) attempts you might be able to pass validation.
I tried several different ways and nothing works
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.ddwrt-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<feature name="openhab-binding-ddwrt" description="ddwrt Binding" version="${project.version}">
<feature prerequisite="true">wrap</feature>
<feature>openhab-runtime-base</feature>
<bundle>wrap:mvn:org.apache.sshd/sshd-osgi/2.14.0&overwrite=merge&Import-Package=!org.apache.tomcat.*,*</bundle>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.ddwrt/${project.version}</bundle>
</feature>
</features>
splatch
(Łukasz Dywicki)
March 18, 2025, 5:22pm
4
The first part after mvn:
url should be dollar sign. Rest of it looks fine. Try this: <bundle>wrap:mvn:org.apache.sshd/sshd-osgi/2.14.0$overwrite=merge&Import-Package=!org.apache.tomcat.*,*</bundle>
splatch:
resolution:="optional"
Thanks I got a little further but stuck on org.apache.tomcat.jni
<bundle>wrap:mvn:org.apache.sshd/sshd-osgi/2.15.0$overwrite=merge&Import-Package=org.apache.tomcat.jni;resolution:="optional",org.bouncycastle.*;resolution:="optional",net.i2p.crypto.*;resolution:="optional",*</bundle>
[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.4.6:verify (karaf-feature-verification) on project org.openhab.binding.ddwrt: Feature resolution failed for [openhab-binding-ddwrt/4.3.4.SNAPSHOT]
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-binding-ddwrt; type=karaf.feature; version=4.3.4.SNAPSHOT; filter:="(&(osgi.identity=openhab-binding-ddwrt)(type=karaf.feature)(version>=4.3.4.SNAPSHOT))" [caused by: Unable to resolve openhab-binding-ddwrt/4.3.4.SNAPSHOT: missing requirement [openhab-binding-ddwrt/4.3.4.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.binding.ddwrt; type=osgi.bundle; version="[4.3.4.202503192132,4.3.4.202503192132]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.binding.ddwrt/4.3.4.202503192132: missing requirement [org.openhab.binding.ddwrt/4.3.4.202503192132] osgi.wiring.package; filter:="(osgi.wiring.package=org.apache.tomcat.jni)"]]
splatch
(Łukasz Dywicki)
March 26, 2025, 7:56pm
6
Lee_Ballard:
org.apache.tomcat.jni
Are you sure you need it? Your binding, or one of dependencies you embedded in it, is trying to make use of it.
Got it working after reading Binding with complex dependencies - #5 by Sonic I removed any changes to feature.xml and updated my pom.xml as follows:
<?xml version="1.0" encoding="UTF-8"?>
<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.3.4-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.binding.ddwrt</artifactId>
<name>openHAB Add-ons :: Bundles :: ddwrt Binding</name>
<properties>
<bnd.importpackage>org.apache.tomcat.jni;resolution:="optional",org.bouncycastle.*;resolution:="optional",sun.security.x509;resolution:="optional"</bnd.importpackage>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-osgi</artifactId>
<version>2.15.0</version>
</dependency>
<!-- For ed25519 support -->
<dependency>
<groupId>net.i2p.crypto</groupId>
<artifactId>eddsa</artifactId>
<version>0.3.0</version>
</dependency>
</dependencies>
</project>
system
(system)
Closed
May 21, 2025, 10:17am
8
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.