Hello *,
I just wanted to extend my openHAB-add-on – and yet again, my IDE started up completely red – full of error-markers. Nothing worked.
So, I set up a new workspace, new Eclipse IDE, all fresh, following your web-page:
I cloned the openhab-distro, openhab-core and openhab2-addons git repositories and imported all the projects into my IDE. I updated the target platform and all seemed good – only 2 error-markers in projects which I didn’t care about. Everything else was fine.
Thus, I cloned my own add-on’s git repo and imported the project. Ran the maven-build (after adapting the version from 2.1 to 2.4) and … it failed!
Well, so I thought I give your own add-ons a try and started a maven build (install) on one of your addons. It failed, too! I tried the same on openhab-core – again it failed. WTF?!
Anyway, I thought I don’t really want to upgrade my productive environment. So I looked in your repos what branches are available and saw the 2.2.x branch. Thus I switched to this older branch. But now, I could not update the target platform. It fails to find a bunch of org.eclipse.smarthome features and plugins.
Hence, I just switched back to master. Now, I could successfully update/reload my target platform and most projects don’t have error-markers, anymore.
But if I run a maven build on openhab-core (right-click its pom.xml => Run as … => Maven install), it fails:
[INFO] --- tycho-compiler-plugin:1.2.0:compile (default-compile) @ org.openhab.core ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:03 min
[INFO] Finished at: 2018-09-28T12:26:52+07:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile (default-compile) on project org.openhab.core: Execution default-compile of goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile failed: Plugin org.eclipse.tycho:tycho-compiler-plugin:1.2.0 or one of its dependencies could not be resolved: Failed to collect dependencies at org.eclipse.tycho:tycho-compiler-plugin:jar:1.2.0 -> org.eclipse.tycho:tycho-compiler-jdt:jar:1.2.0 -> org.eclipse.jdt:org.eclipse.jdt.core:jar:3.13.102 -> org.eclipse.platform:org.eclipse.core.resources:jar:[3.12.0,4.0.0): No versions available for org.eclipse.platform:org.eclipse.core.resources:jar:[3.12.0,4.0.0) within specified range -> [Help 1]
I’m stuck, now, and cannot integrate my new solar system (PV inverters+chargers)
Finally, it’s time for a serious complaint: I really like openHAB and it runs stable controlling all the stuff in my house for over a year, now. But developing an add-on is a real nightmare! The very fragile build environment breaks again and again. It’s always the same: If I need to extend my add-on, I first need to waste at least half a day to get the build running again. And usually I’m also forced to update to the newest openHAB version, as well.
And today, even the newest version doesn’t work at all.
Why is it so hard to set up an environment that does not break time and again by itself? Or is it already possible to develop an add-on for a stable openHAB-release and I just don’t know how? I mean develop not against the git master but against a stable branch? If it is possible, how? And why does it not work with the 2.2.x git branch? And why is there no 2.3.x branch? Shouldn’t there be a branch for each release?
Best regards, Marco.