Eclipse setup for developing 2.5.x addon

I’ve successfully set up an environment for 3.0 and debugged my Awair addon, getting all the way to the gratifying point of “0 errors” on the Maven build. Now I’d like to build it for 2.5.x so that I can test it in my OH system, but I’m running into the sand a bit. When you select the github projects in the Eclipse advanced setup, you can choose the 2.5.x branch for everything except the core. Does that mean the core isn’t needed? Can you leave it out - will the dependencies still work?

You don’t need core in eclipse to develop a binding. Maven will download necessary dependencies. So you can simply switch branches with git on the addons repo and distro repo. For your binding you need to make some changes to make your code 2.5 compatible.

1 Like

OK great. Are there any specific changes I need to take into account in the binding? If I’m not mistaken, I think my binding was based on making a copy of the FooBot binding in 2.5.x, so maybe I need to make changes for it to work in 3.0.0?

Here is the information about what to change between 2.5.x and 3.0:

1 Like

That was mostly it. I had the imports set up for 3.0.0, and so had to change them back to 2.5.x. I changed:




and also had to change the unit test imports and add a few more imports that seem to be needed in 2.5.x (I copied what I found in the 2.5.x version of the foobot binding).

At the end of the Maven build I got a ton of errors starting with this:

 Feature resolution failed for [openhab-binding-awair/2.5.11.SNAPSHOT]
[ERROR] Message: Unable to resolve root: missing requirement [root] osgi.identity; 

Hunting around on the forum, I found this post:

And changed the following in feature.xml in my binding:

<bundle start-level="80">


<bundle dependency="true">

I have absolutely no idea what it does, but it got rid of the errors.