Need help to fix 'feature.xml' problem in a new OH Core Module

I am developing a new OH core module ‘suggested addon finder’ service to find suggested addons to install – see #3806 and #2645 – but I am unable to get the code to build due to an ‘Unable to resolve root’ message as below. I think I need to edit the feature.xml file, but I don’t know enough about such files to know how or where I should change it? => Does anyone have any suggestions?

Error:  Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.4.3:verify (karaf-feature-verification) on project org.openhab.core.features.karaf.openhab-core: Feature resolution failed for [openhab-core-base/4.1.0.SNAPSHOT]
Error:  Message: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=openhab-core-base; type=karaf.feature; version=4.1.0.SNAPSHOT; filter:="(&(osgi.identity=openhab-core-base)(type=karaf.feature)(version>=4.1.0.SNAPSHOT))" [caused by: Unable to resolve openhab-core-base/4.1.0.SNAPSHOT: missing requirement [openhab-core-base/4.1.0.SNAPSHOT] osgi.identity; osgi.identity=org.openhab.core.io.rest.core; type=osgi.bundle; version="[4.1.0.202309220908,4.1.0.202309220908]"; resolution:=mandatory [caused by: Unable to resolve org.openhab.core.io.rest.core/4.1.0.202309220908: missing requirement [org.openhab.core.io.rest.core/4.1.0.202309220908] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.openhab.core.config.discovery.addon)(version>=4.1.0)(!(version>=5.0.0)))"]]

Thank you Andrew for working on this great feature, I think it will really help making openHAB easier for first time users. Sorry no help but will be watching your thread on github

The openhab-core-base feature fails to resolve because rest module does use new package you added, but there is no provider for it. In simpler words, you need to add config.discovery.addon module to OH core-base feature.

@splatch many thanks for the feedback. I think the problem is that the new service requires config.discovery.mdns, and io.rest requires the service, and io.sitemap requires io.rest, etc. I have spent probably 4…5 hours adding the service to all the (to me) obvious places in feature.xml, without success. Its not obvious to me whether I need to create a new feature for the service, (with or without its dependency on discovery.mdns), or whether I should simply sprinkle the bundle directly in all the places where the build fails, by trial and error until it finally does work. I was hoping there might be something more scientific to tell me what to add, and where. :slight_smile:

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