Itests: problem with bnd resolver (unable to resolve org.junit.jupiter.api)

Hi,

I have trouble running the itests locally (commit 2127ac)

/src/openhab-master/git/openhab-addons $ mvn clean install -DwithResolver=true  -pl :org.openhab.binding.modbus,:org.openhab.binding.modbus.tests
... SNIP ...
[INFO] --- bnd-maven-plugin:5.2.0:bnd-process (default) @ org.openhab.binding.modbus.tests ---
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ org.openhab.binding.modbus.tests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/salski/src/openhab-master/git/openhab-addons/itests/org.openhab.binding.modbus.tests/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ org.openhab.binding.modbus.tests ---
[INFO] No sources to compile
[INFO] 
[INFO] --- maven-surefire-plugin:3.0.0-M5:test (default-test) @ org.openhab.binding.modbus.tests ---
[INFO] No tests to run.
[INFO] 
[INFO] --- maven-jar-plugin:3.0.2:jar (default-jar) @ org.openhab.binding.modbus.tests ---
[INFO] Building jar: /home/salski/src/openhab-master/git/openhab-addons/itests/org.openhab.binding.modbus.tests/target/org.openhab.binding.modbus.tests-3.1.0-SNAPSHOT.jar
[INFO] 
[INFO] --- bnd-indexer-maven-plugin:5.2.0:index (index) @ org.openhab.binding.modbus.tests ---
[INFO] 
[INFO] --- bnd-indexer-maven-plugin:5.2.0:index (test-index) @ org.openhab.binding.modbus.tests ---
[INFO] 
[INFO] --- bnd-resolver-maven-plugin:5.2.0:resolve (default) @ org.openhab.binding.modbus.tests ---
[ERROR] Resolution failed. Capabilities satisfying the following requirements could not be found:
    [<<INITIAL>>]
      β‡’ osgi.identity: (osgi.identity=org.openhab.binding.modbus.tests)
          β‡’ [org.openhab.binding.modbus.tests version=3.1.0.202101290639]
              β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.junit.jupiter.api)(version>=5.7.0)(!(version>=6.0.0)))
The following requirements are optional:
    [org.apache.felix.configadmin version=1.9.8]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.osgi.service.coordinator)(version>=1.0.0)(!(version>=2.0.0)))
    [junit-jupiter-api version=5.6.2]
      β‡’ osgi.wiring.package: (osgi.wiring.package=kotlin.jvm.internal)
      β‡’ osgi.wiring.package: (osgi.wiring.package=kotlin)
      β‡’ osgi.wiring.package: (osgi.wiring.package=kotlin.collections)
      β‡’ osgi.wiring.package: (osgi.wiring.package=kotlin.jvm.functions)
    [org.eclipse.jetty.server version=9.4.20.v20190813]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.jmx)(version>=9.4.20)(!(version>=10.0.0)))
    [ch.qos.logback.classic version=1.2.3]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.runtime.wrappers)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.runtime.callsite)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.control)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.servlet.http)(version>=3.1.0)(!(version>=4.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.runtime)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.servlet)(version>=3.1.0)(!(version>=4.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=groovy.lang)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.runtime.typehandling)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.control.customizers)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.transform)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.reflection)(version>=2.4.0)(!(version>=3.0.0)))
    [org.eclipse.jetty.servlet version=9.4.20.v20190813]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util.annotation)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util.component)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util.log)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.jmx)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util.resource)(version>=9.4.20)(!(version>=10.0.0)))
    [org.openhab.core version=3.0.0.202012040254]
      β‡’ osgi.service: (objectClass=org.openhab.core.scheduler.CronJob)
      β‡’ osgi.service: (objectClass=org.openhab.core.auth.AuthenticationProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.binding.BindingInfoProvider)
    [org.apache.felix.gogo.runtime version=1.0.10]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.osgi.service.event)(version>=1.3.0)(!(version>=2.0.0)))
    [org.apache.geronimo.specs.geronimo-activation_1.1_spec version=1.1.0]
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.geronimo.osgi.registry.api)
    [org.apache.felix.scr version=2.1.10]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.osgi.service.metatype)(version>=1.2.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.apache.felix.shell)(version>=1.0.0)(!(version>=1.1.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.apache.felix.service.command)(version>=1.0.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.osgi.service.cm)(version>=1.6.0)(!(version>=2.0.0)))
    [org.openhab.core.config.core version=3.0.0.202012040258]
      β‡’ osgi.service: (objectClass=org.openhab.core.i18n.TranslationProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.config.core.status.ConfigStatusProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.config.core.metadata.MetadataConfigDescriptionProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.config.core.ConfigDescriptionAliasProvider)
    [org.eclipse.jetty.http version=9.4.20.v20190813]
      β‡’ osgi.extender: (osgi.extender=osgi.serviceloader.processor)
      β‡’ osgi.extender: (osgi.extender=osgi.serviceloader.registrar)
    [biz.aQute.tester.junit-platform version=5.1.2.202007211702]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.junit)(version>=4.10.0)(!(version>=5.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=aQute.bnd.service)(version>=4.5.0)(!(version>=5.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=junit.framework)(version>=3.8.0)(!(version>=5.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=aQute.bnd.build)(version>=3.4.0)(!(version>=4.0.0)))
      β‡’ osgi.extender: (&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0.0)(!(version>=2.0.0)))
    [org.eclipse.jetty.util version=9.4.20.v20190813]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.slf4j)(version>=1.7.25)(!(version>=2.0.0)))
      β‡’ osgi.extender: (osgi.extender=osgi.serviceloader.processor)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.slf4j.spi)(version>=1.7.25)(!(version>=2.0.0)))
      β‡’ osgi.serviceloader: (osgi.serviceloader=org.eclipse.jetty.util.security.CredentialProvider)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.slf4j.helpers)(version>=1.7.25)(!(version>=2.0.0)))
    [org.openhab.core.thing version=3.0.0.202012040259]
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.firmware.FirmwareProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.profiles.ProfileAdvisor)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.binding.ThingTypeProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.profiles.ProfileFactory)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.type.DynamicCommandDescriptionProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.type.DynamicStateDescriptionProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.events.EventPublisher)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.binding.firmware.FirmwareUpdateHandler)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.binding.ThingHandlerFactory)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.type.ChannelGroupTypeProvider)
    [ch.qos.logback.core version=1.2.3]
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.codehaus.janino)
      β‡’ osgi.wiring.package: (osgi.wiring.package=javax.mail.internet)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.servlet.http)(version>=3.1.0)(!(version>=4.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.servlet)(version>=3.1.0)(!(version>=4.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.codehaus.commons.compiler)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.fusesource.jansi)(version>=1.9.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=javax.mail)
    [xstream version=1.4.13]
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.sun.xml.internal.stream)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.dom4j.tree)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.jdom2)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.joda.time.format)(version>=1.6.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.kxml2.io)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.jettison.mapped)(version>=1.2.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=nu.xom)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.bea.xml.stream)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.joda.time)(version>=1.6.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.xml.bind)(version>=2.3.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.xmlpull.v1)
      β‡’ osgi.wiring.package: (osgi.wiring.package=net.sf.cglib.proxy)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.dom4j)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.jdom.input)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.dom4j.io)
      β‡’ osgi.wiring.package: (osgi.wiring.package=javax.activation)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.xmlpull.mxp1)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.jdom2.input)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.ctc.wstx.stax)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.ibm.xml.xlxp.api.stax)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.jdom)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.jettison)(version>=1.2.0)(!(version>=2.0.0)))
    [com.sun.xml.bind.jaxb-osgi version=2.3.3]
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.tools.ant.taskdefs.compilers)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.tools.ant)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.tools.ant.types)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.sun.org.apache.xml.internal.resolver)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.sun.org.apache.xml.internal.resolver.tools)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.tools.ant.taskdefs)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for openHAB Add-ons :: Bundles :: Modbus Binding 3.1.0-SNAPSHOT:
[INFO] 
[INFO] openHAB Add-ons :: Bundles :: Modbus Binding ....... SUCCESS [ 16.664 s]
[INFO] openHAB Add-ons :: Integration Tests :: Modbus Binding Tests FAILURE [  5.358 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  24.098 s
[INFO] Finished at: 2021-01-29T08:39:14+02:00
[INFO] ------------------------------------------------------------------------
[INFO] Static code analysis summary report is available in:
[INFO] file:/home/salski/src/openhab-master/git/openhab-addons/target/summary_report.html
[ERROR] Failed to execute goal biz.aQute.bnd:bnd-resolver-maven-plugin:5.2.0:resolve (default) on project org.openhab.binding.modbus.tests: Unable to resolve <<INITIAL>>: missing requirement osgi.identity;filter:='(osgi.identity=org.openhab.binding.modbus.tests)' [caused by: Unable to resolve org.openhab.binding.modbus.tests version=3.1.0.202101290639: missing requirement osgi.wiring.package;filter:='(&(osgi.wiring.package=org.junit.jupiter.api)(version>=5.7.0)(!(version>=6.0.0)))';osgi.wiring.package='org.junit.jupiter.api'] -> [Help 1]
[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/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :org.openhab.binding.modbus.tests

What could be the reason for this error?

Maybe you have some local changes?

It shouldn’t come up with 3.0.0 on the current main branch.

It adds the following changes when resolving the itests in your PR:

diff --git a/itests/org.openhab.binding.modbus.tests/itest.bndrun b/itests/org.openhab.binding.modbus.tests/itest.bndrun
index d27327c3ae..556413655f 100644
--- a/itests/org.openhab.binding.modbus.tests/itest.bndrun
+++ b/itests/org.openhab.binding.modbus.tests/itest.bndrun
@@ -77,4 +77,5 @@ Fragment-Host: org.openhab.binding.modbus
        org.objenesis;version='[3.1.0,3.1.1)',\
        org.mockito.junit-jupiter;version='[3.7.0,3.7.1)',\
        biz.aQute.tester.junit-platform;version='[5.2.0,5.2.1)',\
-       org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)'
+       org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\
+       junit-jupiter-params;version='[5.7.0,5.7.1)'

That should stop the build from hanging… but it then fails with:

TEST org.openhab.binding.modbus.tests.ModbusDataHandlerTest#testWriteHoldingBitDataRegisterOutOfBounds2() <<< ERROR: 
Expected: is <ONLINE>
     but: was <OFFLINE>
java.lang.AssertionError: 
Expected: is <ONLINE>
     but: was <OFFLINE>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:6)
	at org.openhab.binding.modbus.tests.ModbusDataHandlerTest.lambda$23(ModbusDataHandlerTest.java:1069)
	at org.openhab.binding.modbus.tests.ModbusDataHandlerTest.testInitGeneric(ModbusDataHandlerTest.java:945)
	at org.openhab.binding.modbus.tests.ModbusDataHandlerTest.testInitGeneric(ModbusDataHandlerTest.java:904)
	at org.openhab.binding.modbus.tests.ModbusDataHandlerTest.testWriteHoldingBitDataRegisterOutOfBounds2(ModbusDataHandlerTest.java:1068)

1 Like

Thanks @wborn , very insightful

Unfortunately I am truly building with no local changes.

~/src/openhab-master/git/openhab-addons $ git rev-parse --short HEAD
b2bb9176e5
~/src/openhab-master/git/openhab-addons $ git status
HEAD detached at origin/main
nothing to commit, working tree clean

Even with -U flag it fails the same way:

mvn clean install -U -DwithResolver=true -pl :org.openhab.binding.modbus,:org.openhab.binding.modbus.tests

[INFO] --- bnd-resolver-maven-plugin:5.2.0:resolve (default) @ org.openhab.binding.modbus.tests ---
[ERROR] Resolution failed. Capabilities satisfying the following requirements could not be found:
    [<<INITIAL>>]
      β‡’ osgi.identity: (osgi.identity=org.openhab.binding.modbus.tests)
          β‡’ [org.openhab.binding.modbus.tests version=3.1.0.202101300651]
              β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.junit.jupiter.api)(version>=5.7.0)(!(version>=6.0.0)))
The following requirements are optional:
    [org.apache.felix.configadmin version=1.9.8]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.osgi.service.coordinator)(version>=1.0.0)(!(version>=2.0.0)))
    [junit-jupiter-api version=5.6.2]
      β‡’ osgi.wiring.package: (osgi.wiring.package=kotlin.jvm.internal)
      β‡’ osgi.wiring.package: (osgi.wiring.package=kotlin)
      β‡’ osgi.wiring.package: (osgi.wiring.package=kotlin.collections)
      β‡’ osgi.wiring.package: (osgi.wiring.package=kotlin.jvm.functions)
    [org.eclipse.jetty.server version=9.4.20.v20190813]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.jmx)(version>=9.4.20)(!(version>=10.0.0)))
    [ch.qos.logback.classic version=1.2.3]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.runtime.wrappers)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.runtime.callsite)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.control)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.servlet.http)(version>=3.1.0)(!(version>=4.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.runtime)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.servlet)(version>=3.1.0)(!(version>=4.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=groovy.lang)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.runtime.typehandling)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.control.customizers)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.transform)(version>=2.4.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.groovy.reflection)(version>=2.4.0)(!(version>=3.0.0)))
    [org.eclipse.jetty.servlet version=9.4.20.v20190813]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util.annotation)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util.component)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util.log)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.jmx)(version>=9.4.20)(!(version>=10.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.eclipse.jetty.util.resource)(version>=9.4.20)(!(version>=10.0.0)))
    [org.openhab.core version=3.0.0.202012040254]
      β‡’ osgi.service: (objectClass=org.openhab.core.scheduler.CronJob)
      β‡’ osgi.service: (objectClass=org.openhab.core.auth.AuthenticationProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.binding.BindingInfoProvider)
    [org.apache.felix.gogo.runtime version=1.0.10]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.osgi.service.event)(version>=1.3.0)(!(version>=2.0.0)))
    [org.apache.geronimo.specs.geronimo-activation_1.1_spec version=1.1.0]
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.geronimo.osgi.registry.api)
    [org.apache.felix.scr version=2.1.10]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.osgi.service.metatype)(version>=1.2.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.apache.felix.shell)(version>=1.0.0)(!(version>=1.1.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.apache.felix.service.command)(version>=1.0.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.osgi.service.cm)(version>=1.6.0)(!(version>=2.0.0)))
    [org.openhab.core.config.core version=3.0.0.202012040258]
      β‡’ osgi.service: (objectClass=org.openhab.core.i18n.TranslationProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.config.core.status.ConfigStatusProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.config.core.metadata.MetadataConfigDescriptionProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.config.core.ConfigDescriptionAliasProvider)
    [org.eclipse.jetty.http version=9.4.20.v20190813]
      β‡’ osgi.extender: (osgi.extender=osgi.serviceloader.processor)
      β‡’ osgi.extender: (osgi.extender=osgi.serviceloader.registrar)
    [biz.aQute.tester.junit-platform version=5.1.2.202007211702]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.junit)(version>=4.10.0)(!(version>=5.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=aQute.bnd.service)(version>=4.5.0)(!(version>=5.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=junit.framework)(version>=3.8.0)(!(version>=5.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=aQute.bnd.build)(version>=3.4.0)(!(version>=4.0.0)))
      β‡’ osgi.extender: (&(osgi.extender=osgi.serviceloader.registrar)(version>=1.0.0)(!(version>=2.0.0)))
    [org.eclipse.jetty.util version=9.4.20.v20190813]
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.slf4j)(version>=1.7.25)(!(version>=2.0.0)))
      β‡’ osgi.extender: (osgi.extender=osgi.serviceloader.processor)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.slf4j.spi)(version>=1.7.25)(!(version>=2.0.0)))
      β‡’ osgi.serviceloader: (osgi.serviceloader=org.eclipse.jetty.util.security.CredentialProvider)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.slf4j.helpers)(version>=1.7.25)(!(version>=2.0.0)))
    [org.openhab.core.thing version=3.0.0.202012040259]
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.firmware.FirmwareProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.profiles.ProfileAdvisor)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.binding.ThingTypeProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.profiles.ProfileFactory)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.type.DynamicCommandDescriptionProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.type.DynamicStateDescriptionProvider)
      β‡’ osgi.service: (objectClass=org.openhab.core.events.EventPublisher)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.binding.firmware.FirmwareUpdateHandler)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.binding.ThingHandlerFactory)
      β‡’ osgi.service: (objectClass=org.openhab.core.thing.type.ChannelGroupTypeProvider)
    [ch.qos.logback.core version=1.2.3]
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.codehaus.janino)
      β‡’ osgi.wiring.package: (osgi.wiring.package=javax.mail.internet)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.servlet.http)(version>=3.1.0)(!(version>=4.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.servlet)(version>=3.1.0)(!(version>=4.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.codehaus.commons.compiler)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.fusesource.jansi)(version>=1.9.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=javax.mail)
    [xstream version=1.4.13]
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.sun.xml.internal.stream)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.dom4j.tree)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.jdom2)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.joda.time.format)(version>=1.6.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.kxml2.io)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.jettison.mapped)(version>=1.2.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=nu.xom)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.bea.xml.stream)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.joda.time)(version>=1.6.0)(!(version>=2.0.0)))
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=javax.xml.bind)(version>=2.3.0)(!(version>=3.0.0)))
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.xmlpull.v1)
      β‡’ osgi.wiring.package: (osgi.wiring.package=net.sf.cglib.proxy)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.dom4j)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.jdom.input)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.dom4j.io)
      β‡’ osgi.wiring.package: (osgi.wiring.package=javax.activation)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.xmlpull.mxp1)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.jdom2.input)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.ctc.wstx.stax)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.ibm.xml.xlxp.api.stax)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.jdom)
      β‡’ osgi.wiring.package: (&(osgi.wiring.package=org.codehaus.jettison)(version>=1.2.0)(!(version>=2.0.0)))
    [com.sun.xml.bind.jaxb-osgi version=2.3.3]
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.tools.ant.taskdefs.compilers)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.tools.ant)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.tools.ant.types)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.sun.org.apache.xml.internal.resolver)
      β‡’ osgi.wiring.package: (osgi.wiring.package=com.sun.org.apache.xml.internal.resolver.tools)
      β‡’ osgi.wiring.package: (osgi.wiring.package=org.apache.tools.ant.taskdefs)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for openHAB Add-ons :: Bundles :: Modbus Binding 3.1.0-SNAPSHOT:
[INFO] 
[INFO] openHAB Add-ons :: Bundles :: Modbus Binding ....... SUCCESS [01:12 min]
[INFO] openHAB Add-ons :: Integration Tests :: Modbus Binding Tests FAILURE [ 29.920 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:44 min
[INFO] Finished at: 2021-01-30T08:52:05+02:00
[INFO] ------------------------------------------------------------------------
[INFO] Static code analysis summary report is available in:
[INFO] file:/home/salski/src/openhab-master/git/openhab-addons/target/summary_report.html
[ERROR] Failed to execute goal biz.aQute.bnd:bnd-resolver-maven-plugin:5.2.0:resolve (default) on project org.openhab.binding.modbus.tests: Unable to resolve <<INITIAL>>: missing requirement osgi.identity;filter:='(osgi.identity=org.openhab.binding.modbus.tests)' [caused by: Unable to resolve org.openhab.binding.modbus.tests version=3.1.0.202101300651: missing requirement osgi.wiring.package;filter:='(&(osgi.wiring.package=org.junit.jupiter.api)(version>=5.7.0)(!(version>=6.0.0)))';osgi.wiring.package='org.junit.jupiter.api'] -> [Help 1]

What would you recommend next? Reinstalling IDE?

I eventually got it working:

  • Removed all git-ignored files, such as .project, .classpath etc.
git clean -fdX
git clean -fX
  • Removed local repository ~/.{m,p}2 (POST note: removing .p2 breaks eclipse installation`)
  • Build whole openhab-addons mvn clean install -DwithResolver=true -DskipTests -DskipChecks=true -U
1 Like

Maybe try building the BOMs too next time. Those projects create some indices used by bnd to resolve dependencies. They may have been outdated causing the wrong dependencies to be resolved.

1 Like

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.