If I build the shelly binding myself with -Dohc.version=3.0.1 it does work with a OH 3.0.1 instance. So looks like that JAR wasn’t build with that option.
@wborn I did a fresh IDE install and ran
“mvn clean install -Dohc.version=3.0.1”
same result
23:12:33.965 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab/addons/org.openhab.binding.shelly-3.1.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.shelly [274]
Unresolved requirement: Import-Package: org.osgi.framework; version="[1.9.0,2.0.0)"
at org.eclipse.osgi.container.Module.start(Module.java:444) ~[org.eclipse.osgi-3.12.100.jar:?]
at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[org.eclipse.osgi-3.12.100.jar:?]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.6.4]
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.6.4]
I tried running “mvn clean install -Dohc.version=3.0.1” vs. “mvn -Dohc.version=3.0.1 clean install” vs. 'mvn clean install -D “ohc.version=3.0.1”`and copied target/…jar to an 3.1M3’s addons folder
I tried to replace ${ohc.version} in feature.xml with “3.0.1” - same result
If I set ohc.version to 3.0.1-SNAPSHOT in openhab-addons/pom.xml see that the Download of 3.0.1 files starts
Downloading from openhab-snapshot: https://openhab.jfrog.io/openhab/libs-snapshot/org/openhab/core/bom/org.openhab.core.bom.compile/3.0.1-SNAPSHOT/maven-metadata.xml
so speifying ohc.version on command line seems to work in general
3.0.1 means regular release/non-SNAPSHOT so that’s ok
I don’t see anymore a download of 3.0.1 files, but I would expect that there are no changes anymore
I’m wondering that pom.xml specifies <karaf.version>4.3.1</karaf.version>. How does that relate to ohc.version. If the new Karaf version is explicitly specified I would gues that this create the dependency to OSGi 7.
Do I need to change any file in addition to specifying -Dohc.version=3.0.1 for mvn?
What else can I check (any log output from build showing the ohc-version)?
From my understanding other developers should face the same problem when doing a fresh install of the IDE. I did nothing special related to my binding.
Install Eclipse, Distro+Binding projects
Create a new branch
copy updated code files to org.openhab.binding.shelly
run “mvn clean install -Dohc.version=3.0.1”
By the way: I use Eclipse on Mac
Wouldn’t it make sense to provide the option to setup the IDE with a specific release version, so not just “2.5.x, 3.0” as selectable streams, but “2.5.x, 3.0.1, 3.1-SNAPSHOT”. Usually there is no need for a binding developer to have the lastest floating core release, especially when architectural things change. It should be possible to create a build environment, which matches the user scenartios: 3.0.1 + a new build of a binding or 3.1-SNAPSNOT_Mx if you require latest core features for your binding (in this case it’s clear that there is a dependency on the specific core release).
That’s strange because it does work for me like that without making any additional changes.
Changing the ohc.version property overrides the versions of OHC Core BOMs used. Those BOMs manage what org.osgi.framework is used. It only seems to be an issue for add-ons with org.osgi.framework imports. E.g. I could use a 3.1.0-SNAPSHOT Nest binding (which doesn’t use these imports) without any issues with OH 3.0.1.
Maybe just create a branch from 3.0.x if it doesn’t work for you?
If there is a 2.5.x stream, I think a 3.0.x stream would make sense too. But I don’t use these streams myself, I just switch between branches.
hi ,
i end up in the same situation.
i set up the IDE according instructions and end up an the error message.
even without adding my binding i do get this error
What needs to be done to get this resolved to be able to start OH3 in debug modus?
@wborn Again I ran into the issue twice. It seems that once you ran a regular mvn clean install (without -Dohc.version=3.0.2) some files in the repository get overwritten and afterwards you run in the sam issue even when building for 3.0.2. Last time I just deleted the org/openhab folder in the .m2 reporitory and was able to fix the issue
This time I’m no longer able to build for 2.5 after doing the same. This error shows up
[ERROR] Failed to execute goal on project org.openhab.binding.carnet: Could not resolve dependencies for project org.openhab.addons.bundles:org.openhab.binding.carnet:jar:2.5.13-SNAPSHOT: The following artifacts could not be resolved: org.openhab.core.bom:org.openhab.core.bom.compile:pom:2.5.0, org.openhab.core.bom:org.openhab.core.bom.openhab-core:pom:2.5.0, org.openhab.core.bom:org.openhab.core.bom.test:pom:2.5.0: Failure to find org.openhab.core.bom:org.openhab.core.bom.compile:pom:2.5.0 in https://openhab.jfrog.io/openhab/libs-release was cached in the local repository, resolution will not be reattempted until the update interval of openhab-release has elapsed or updates are forced -> [Help 1]
I tried to run “mvn clean install -U”, but problem persists. Was anything in the 2.5 repo removed causing this problem?
The above fixed an issue for me as the build was passing but openHAB was complaining about missing javax.measure when the jar was placed into the addons folder of openHAB 3.1m4
After doing the above the jar now works perfect. I don’t build for V2.5 anymore but I used to on this machine 8 months ago, so guessing I had some stuff left over that was causing issues.
@wborn Today I get the following warnings when starting my binding in Eclipse
Mai 19, 2021 9:37:15 VORM. org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFORMATION: Adding the extensions from bundle org.apache.cxf.cxf-rt-frontend-jaxrs (112) [org.apache.cxf.jaxrs.JAXRSBindingFactory]
Mai 19, 2021 9:37:15 VORM. org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFORMATION: Adding the extensions from bundle org.apache.cxf.cxf-rt-rs-sse (114) [org.apache.cxf.transport.sse.SseProvidersExtension]
Mai 19, 2021 9:37:15 VORM. org.apache.cxf.bus.osgi.CXFExtensionBundleListener addExtensions
INFORMATION: Adding the extensions from bundle org.apache.cxf.cxf-rt-transports-http (116) [org.apache.cxf.transport.http.HTTPTransportFactory, org.apache.cxf.transport.http.HTTPWSDLExtensionLoader, org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder, org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder, org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider]
Mai 19, 2021 9:37:15 VORM. org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
INFORMATION: Aries Blueprint packages not available. So namespaces will not be registered
Mai 19, 2021 9:37:15 VORM. org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
INFORMATION: Aries Blueprint packages not available. So namespaces will not be registered
Mai 19, 2021 9:37:15 VORM. org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
INFORMATION: Aries Blueprint packages not available. So namespaces will not be registered
Mai 19, 2021 9:37:15 VORM. org.apache.cxf.bus.blueprint.NamespaceHandlerRegisterer register
INFORMATION: Aries Blueprint packages not available. So namespaces will not be registered
Mai 19, 2021 9:37:15 VORM. org.apache.aries.spifly.BaseActivator log
INFORMATION: Registered provider org.apache.aries.jax.rs.whiteboard.internal.client.ClientBuilderImpl of service javax.ws.rs.client.ClientBuilder in bundle org.apache.aries.jax.rs.whiteboard
Mai 19, 2021 9:37:15 VORM. org.apache.aries.spifly.BaseActivator log
INFORMATION: Registered provider org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl of service javax.ws.rs.ext.RuntimeDelegate in bundle org.apache.aries.jax.rs.whiteboard
Mai 19, 2021 9:37:15 VORM. org.apache.aries.spifly.BaseActivator log
INFORMATION: Registered provider org.apache.cxf.jaxrs.sse.client.SseEventSourceBuilderImpl of service javax.ws.rs.sse.SseEventSource.Builder in bundle org.apache.aries.jax.rs.whiteboard
Mai 19, 2021 9:37:16 VORM. org.apache.aries.spifly.BaseActivator log
INFORMATION: Registered provider org.eclipse.jetty.http.Http1FieldPreEncoder of service org.eclipse.jetty.http.HttpFieldPreEncoder in bundle org.eclipse.jetty.http
Mai 19, 2021 9:37:16 VORM. org.apache.aries.spifly.BaseActivator log
INFORMATION: Registered provider org.eclipse.jetty.websocket.common.extensions.identity.IdentityExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
Mai 19, 2021 9:37:16 VORM. org.apache.aries.spifly.BaseActivator log
INFORMATION: Registered provider org.eclipse.jetty.websocket.common.extensions.fragment.FragmentExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
Mai 19, 2021 9:37:16 VORM. org.apache.aries.spifly.BaseActivator log
INFORMATION: Registered provider org.eclipse.jetty.websocket.common.extensions.compress.PerMessageDeflateExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
Mai 19, 2021 9:37:16 VORM. org.apache.aries.spifly.BaseActivator log
INFORMATION: Registered provider org.eclipse.jetty.websocket.common.extensions.compress.DeflateFrameExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
Mai 19, 2021 9:37:16 VORM. org.apache.aries.spifly.BaseActivator log
INFORMATION: Registered provider org.eclipse.jetty.websocket.common.extensions.compress.XWebkitDeflateFrameExtension of service org.eclipse.jetty.websocket.api.extensions.Extension in bundle org.eclipse.jetty.websocket.common
I did
Project cleam
updated dependencies in Eclipse
mvn clean install with -U
What does " Aries Blueprint packages not available" mean?