I’m currently trying to build a little binding controlling a custom backend (as a standalone plugin, not to be integrated in the main addon repo). Because I’m not at all familiar with maven (and all it’s black magic) and I’m making use of some custom build logic, I’m using gradle for the build.
It’s also kinda working so far, I can build it, install it (via bundle:install) and start it, but I can’t see the custom binding, even after restart. Also no logs mentioning anything seemingly.
The bundle.xml is present in the final jar and so is the MANIFEST.MF and the HandlerFactory XML file in the OSGI-INF Folder.
MANIFEST.MF
Manifest-Version: 1.0
Bnd-LastModified: 1622580155443
Bundle-ManifestVersion: 2
Bundle-Name: Secure GPIO
Bundle-SymbolicName: secure-gpio
Bundle-Version: 1.0.0.SNAPSHOT
Created-By: 16.0.1 (AdoptOpenJDK)
Export-Package: com.gitlab.cromefire.openhabsecuregpio;uses:="org.open
hab.core.thing,org.openhab.core.thing.binding,org.openhab.core.thing.
type,org.openhab.core.types";version="1.0.0"
Import-Package: java.io,java.math,java.net,java.nio,java.nio.channels,
java.nio.charset,java.security,java.text,java.time,java.util,java.uti
l.concurrent,java.util.concurrent.atomic,java.util.concurrent.locks,j
ava.util.function,java.util.jar,java.util.logging,java.util.regex,jav
a.util.stream,java.util.zip,javax.lang.model.element,org.openhab.core
.thing;version="[3.0,4)",org.openhab.core.thing.binding;version="[3.0
,4)",org.openhab.core.thing.type;version="[3.0,4)",org.openhab.core.t
ypes;version="[3.0,4)",sun.misc
Private-Package: OH-INF.binding,com.gitlab.cromefire.openhabsecuregpio
.protocol,com.google.common.annotations,com.google.common.base,com.go
ogle.common.cache,com.google.common.collect,com.google.common.escape,
com.google.common.eventbus,com.google.common.graph,com.google.common.
hash,com.google.common.html,com.google.common.io,com.google.common.ma
th,com.google.common.net,com.google.common.primitives,com.google.comm
on.reflect,com.google.common.util.concurrent,com.google.common.util.c
oncurrent.internal,com.google.common.xml,com.google.errorprone.annota
tions,com.google.errorprone.annotations.concurrent,com.google.j2objc.
annotations,com.google.protobuf,google.api,google.cloud.audit,google.
geo.type,google.logging.type,google.longrunning,google.protobuf,googl
e.protobuf.compiler,google.rpc,google.rpc.context,google.type,io.grpc
,io.grpc.internal,io.grpc.kotlin,io.grpc.netty,io.grpc.protobuf,io.gr
pc.protobuf.lite,io.grpc.stub,io.grpc.stub.annotations,io.perfmark,ja
vax.annotation,javax.annotation.concurrent,javax.annotation.meta,java
x.annotation.security,kotlin,kotlin.annotation,kotlin.collections,kot
lin.collections.builders,kotlin.collections.jdk8,kotlin.collections.u
nsigned,kotlin.comparisons,kotlin.coroutines,kotlin.coroutines.cancel
lation,kotlin.coroutines.intrinsics,kotlin.coroutines.jvm.internal,ko
tlin.experimental,kotlin.internal,kotlin.internal.jdk7,kotlin.interna
l.jdk8,kotlin.io,kotlin.js,kotlin.jvm,kotlin.jvm.functions,kotlin.jvm
.internal,kotlin.jvm.internal.markers,kotlin.math,kotlin.native.concu
rrent,kotlin.random,kotlin.random.jdk8,kotlin.ranges,kotlin.reflect,k
otlin.sequences,kotlin.streams.jdk8,kotlin.text,kotlin.text.jdk8,kotl
in.time,kotlin.time.jdk8,kotlinx.coroutines,kotlinx.coroutines.channe
ls,kotlinx.coroutines.flow,kotlinx.coroutines.flow.internal,kotlinx.c
oroutines.internal,kotlinx.coroutines.intrinsics,kotlinx.coroutines.s
cheduling,kotlinx.coroutines.selects,kotlinx.coroutines.sync,org.chec
kerframework.checker.nullness.compatqual,org.jetbrains.annotations
Provide-Capability: osgi.service;objectClass:List<String>="com.gitlab.
cromefire.openhabsecuregpio.SecureGPIOHandlerFactory";uses:="com.gitl
ab.cromefire.openhabsecuregpio"
Require-Capability: osgi.extender;filter:="(&(osgi.extender=osgi.compo
nent)(version>=1.4.0)(!(version>=2.0.0)))",osgi.ee;filter:="(&(osgi.e
e=JavaSE)(version=11))"
Service-Component: OSGI-INF/com.gitlab.cromefire.openhabsecuregpio.Sec
ureGPIOHandlerFactory.xml
Tool: Bnd-5.3.0.202102221516
Not sure if I’m doing something obviously wrong or if there is some weird OSGI stuff being picky.
Code: Files · b7f0d70bd6b30e2cc609f012f66e9b38496dfeb3 · Cromefire_ / OpenHAB Secure GPIO · GitLab
To build it just run ./gradlew :binding:build
, the jar file will be at bridge/build/libs/secure-gpio-[version]-bundle.jar
.