Installing the latest dev environment?

I’m trying to get my system able to compile bindings again, and have decided to reinstall the development system.

I note that in the instructions, it states to install using a repo that is not part of the OH framework, but is from @maggu2810 - is this really correct?

Following these instructions, and including the astro binding as an example, I end up with most of the ESH/OH Core dependencies not being resolved -:

I know things are very fluid at the moment with these changes, but I’d really like to get a working system :wink: . Are these instructions still valid, and if so, any thoughts as to what is wrong would be appreciated.

Maven must run through first. It “installs” the core dependencies to your local maven cache where Eclipse picks it up again.

That’s the downside of using a buildsystem (maven) that is not really supported by Eclipse (only via the buggy m2e plugin).

Thanks David - it might pay to add this to the build instructions :wink: .

However, it didn’t completely resolve all the dependancies. I still have a lot of the annotations (eg the OSGi Component/Reference annotations), and org.apache.commons - maybe others as well as I’ve not looked through everything yet. This is just with the single astro binding installed as per the instructions…

Chris : it’s strange the guide does not work for you: it has been tested several times starting from a clean situation (clean local maven repo and no previous eclipse install)

try solve dependencies with this step:

  1. From the openhab2-addons directory run: mvn -DskipChecks -DskipTests clean install to rebuild the list of bindings in the BOM (Bill Of Material) and make your new binding visible from the project

Hope it helps.

Btw I just pushed a PR for a new guide version that does not use Maggu demo app but the openHAB distro instead. You might try to start from that one.

I have also removed maggus demo app instructions from the openhab2-addons readme.

Although our current approach is not optimal in terms of build time, at least it somehow works.

List of things to solve:

  • Add binding and other archetypes to the Eclipse oomph setup. That way you could simple click on “New project -> From Archetype” in Eclipse to create a new addon.
  • Use one approach for VScode and Eclipse: At the moment the distro app doesn’t seem to use Karaf, while the VScode approach does.

Note that the mention about running mvn clean is not in the main install section - it is only in a section further down about writing a new binding which I didn’t get to as from the instructions it should have compiled earlier with existing bindings (as I understand it). I think adding the fact that you must run maven is a kind of important step as it simply doesn’t work without this and following the instructions at the moment does not do this.

Thanks - I’ll try a complete reinstall.