In step 7, I am trying to use “org.openhab.binding.modbus” (instead of astro in the guide above).
But I cannot make it work, a dependency is missing and I cannot see the binding in paperui. Note that deploying the jar file from the target directory (after a mvn clean install) into a real installation works as expected, so that looks like an Eclipse issue.
What am I missing?
Thanks in advance!
OS: Ubuntu 18.04
Java Runtime Environment: OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)
*** Begin out of topic
The hint isn’t very helpful. Since months there are a lot of problems with the stupid new development environment ‘bnd’ and the dependencies.
Someone has decided to kill the previously very well working development environment and switch to a new, not sufficiently tested and for us for Eclipse developers useless environment.
It’s not just a problem that ‘bnd’ doesn’t seem to get further developed for Eclipse, there is also very little documentation or troubleshooting support for binding programming under openhab. In addition, even here in the forum there is either no experience or knowledge, respectly the specialists don’t find time to share their knowledge with us seeking help.
In my opinion we are unfortunately in the process of killing a really well established open source application. And all because the Eclipse development environment for openhab is not stable enough to run or the announced step by step guide is still not available.
*** End out of topic
I myself have been trying for many weeks to get my self-developed binding to work under the new environment and have similar problems as bubuche79.
Deploying the jar file from the target directory (after a mvn clean install) into a real installation works as expected. But as soon as I start the described steps within Eclipse and the bnd environment, I get incomprehensible hints about missing dependencies, which in my opinion are not related to my binding.
Nevertheless, if someone can help, I have added my current error message. I would be grateful for a concrete hint solution.
Unfortunately I tend to agree with @rainer300. There is a long thread below that might be of interest -:
I had a LOT of problems (still do) - especially with the ZigBee binding where I had to change dependency versions. I found that I had to do the following to make the system resolve dependencies when I changed them in the pom -:
Changed to master and saw that demo.app was resolving the 1.1.6 libraries
Changed back to the branch with the 1.2.1 libraries, and demo.app is resolving 1.2.0 libraries - pom correctly shows 1.2.1
The IDE is correctly using the 1.2.1 source
When running the demo.app, it’s still using 1.2.0 (which at least is consistent with what it is resolving this time!).
Tried cleaning the workspace, updating maven in the IDE (which then requires an IDE restart before demo.app will resolve dependencies) but I can’t now get the demo.app to pick up the 1.2.1 libraries.
I’ve now found that I have to run mvn clean install in the zigbee binding folder, then restart the IDE, and only then will it resolve the 1.2.1 version of the dependencies! The IDE restart was required here - without the restart it continued to show 1.2.0 .
I would suggest to post your problem on the above linked thread. Unfortunately I can’t say it’s likely to get resolved quickly, but at least it’s the currently place where these issues are being consolidated.
Couldn’t agree more - we’re spending a lot of valuable time with it. Within this year it took me several fresh setups of Eclipse to come to a workaround as compromise with which it is possible to live.
I’m new to binding development, and the errors thrown by the system range from incomprehensible to unhelpful. I have yet to find an explanation of what the “resolve” step for the app.bndrun does, or how to fix the problems that show up with items I’ve never touched and wasn’t aware I was even trying to load.
It’s been quite frustrating, and has gone on for months. The “we’ll have a new guide soon!” message is getting old.
I admit, the guide that’s there seems to work if you start from a perfect, clean install. Once.
Hi, I really like openhab and I was developing a plugin in 2.4 for personal use (at least for now) and I am not able to make it work. I tried for weeks, but what it is even worse is that the new IDE setup does not work for very well stablished plugins. I cannot make it work for homekit or network (for which I have small personal changes). This has being going on for months and I agree that if this is not solved soon the project will die.
Please come up with a working IDE!!!
The goal of the project is OPENHAB itself, not a breakthrough development process. Don’t loose prespective. A perfect IDE should not be the goal (I hope).
I’ve been doing as suggested, and updating that github PR. The odd part is that my problems seem to transient, and are so often apparently caused by something that should be innocuous, like rebooting. And the messages generated don’t give me enough information to diagnose it, so I’m having to bother people to figure it out.
I’m now entirely stuck, and as far as I can tell, it’s all build system and dependency problems. The Github issue has gotten little traffic, and while there have been responses, none of them are addressing the inability to resolve dependencies.
Until I can do that, I can’t build at all. I’ve spent a couple of weeks now fighting with this thing, and am stumped.
Replacing step seven by editing the file eclipse-workspace/.git/openhab-distro/launch/app/pom.xml for including the appropriate binding (look for the embedded comments uncomment this and add the name of your binding that you want to work on)
And, finally, the step eight leads to a working IDE.
Adding a binding with a dependency still does not work out of the box.
With org.openhab.binding.modbus I get:
Resolution failed. Capabilities satisfying the following requirements could not be found:
⇒ osgi.identity: (osgi.identity=org.openhab.binding.modbus)
⇒ [org.openhab.binding.modbus version=22.214.171.124911070336]
⇒ osgi.wiring.package: (&(osgi.wiring.package=org.openhab.io.transport.modbus))
The difference is that now, when adding missing dependencies in the pom.xml, that works!