I did write a new binding to get soma data out of my sma inverter. Now I wanted to test everything and did a clean install via eclipse IDE. Unfortunately I am getting the following error:
[ERROR] Failed to execute goal org.commonjava.maven.plugins:directory-maven-plugin:0.3.1:directory-of (directories) on project org.openhab.binding.smainverter: Cannot find directory for project: org.openhab.addons:org.openhab.addons.reactor -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.commonjava.maven.plugins:directory-maven-plugin:0.3.1:directory-of (directories) on project org.openhab.binding.smainverter: Cannot find directory for project: org.openhab.addons:org.openhab.addons.reactor
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
no I did not use the skeleton script but copied an existing binding (mail) and changed everything like artifactId etc.
I used the IDE setup which is described here:
I thought that instead of using the astro binding as described in the example I could simply us my binding and run / test itā¦
AM I wrong with that?
No itās not wrong. Itās just more work. You need to change the code on some other files too, while the skeleton script just generates that for you.
You should add your binding to the pom.xml in the bundle directory to get ride of this error. Or just use the skeleton script to create a new basis and just copy any code changes you made already into that new binding.
Not directly sure what causes it. But with the release of 2.5 there is technically no 2.5.0-SNAPSHOT anymore. So update the version in your pom to 3.0.0-SNAPSHOT and rebase your branch to openhab2-addons master and then run maven with additional commands: -am -U.
Following PR #6702, I ended up performing git reset --hard against openhab:2.5.x, followed by ./create_openhab_binding_skeleton.sh.... for my custom binding to reimplement existing code into latest compile/runtime environment.
However, after doing so, my mvn clean install end up with the same error as described in this thread:
[ERROR] Failed to execute goal org.commonjava.maven.plugins:directory-maven-plugin:0.3.1:directory-of (directories) on project org.openhab.binding.freeathome: Cannot find directory for project: org.openhab.addons:org.openhab.addons.reactor -> [Help 1]
Currently you have to perform two changes after running the script on the 2.5.x branch:
Change the version in the POM of the new binding (pom.xml) to:
<version>2.5.1-SNAPSHOT</version>
Change the openhab Core repository version in the feature file (src/main/feature/feature.xml) by renaming the variable {project.version} to {ohc.version}:
Hey, Iām getting the same error in a PR for a new binding:
Itās already based on the 2.5.x branch, the version is already set to 2.5.1-SNAPSHOT and I also had made the change to {ohc.version} before.
Funny thing is, the travis check before my latest commit was successful.
The only thing I changed was to remove a newline in my local feature.xml which broke the generation of the global feature.xml.
Hi, I ran into the same issue with PR #6785. So I checked the PR linked by @pravussum and noticed the issue was resolved there?
After comparing sources, I found out that in my PR the binding package was missing in bom\openhab-addons\pom.xml. After adding it, the Travis test completed succesfully. I had also previously changed the version to 2.5.2-SNAPSHOT and {ohc.version} in the feature file. Thought Iād share this for future reference.
Sorry, forgot to report back here. The version in the 2.5.x branch was changed from 2.5.1-SNAPSHOT to 2.5.2-SNAPSHOT while I created and tried to build the PR.
Once I updated everything from 2.5.x, (at least) this issue was fixed.