Build environment won't

  • Platform information:
    • Hardware: Intel x64, VM with 4x virtual CPU, 16GB RAM 50GB disc
    • OS: OpenSuSE tumbleweed, current.
    • Java Runtime Environment: OpenJDK 11
    • openHAB version: main from git
  • Issue of the topic:

I was hoping to be able to build an OH3 version of the Eagle 200 binding. Between the way the old binding worked and the Eagle 200 API documentation, I am confident I know the technical data of what needs to happen to get the data from the device. It’s a pretty straightforward XML API call to a local device.

In the past, I’d worked on porting Insteon to OH3 but ran out of time and didn’t finish. Luckily, someone else did, for which I am very grateful. I mention it because it means I had a workign development environment at one point - but it was quite a while ago. Java 8, for example.

I upgraded the host to current opensuse, and I installed the Zulu OpenJDK11 kit. I checked that Maven is relatively current. (It’s at 3.2, one minor rev back.) Java is correctly found in the path and by JAVA_HOME.

I downloaded a fresh Eclipse Installer, and installed Eclipse into a new path, following the directions for Eclipse in the devloper’s section. I tried with the 2019-06 version suggested in the docs, and I selected the Openhab Development and Openhab Add-Ons items from the list.

The Eclipse installer did its thing, and that looked fine.

Eclipse came up, and the installer had it run setup options. It used git to pull down the sources, and did some setup stuff…

Then it stopped. No build ran. There is no build available in the menus.

I assumed something was weird with the Zulu JDK, and switched to the OpenJDK 11. Deleted the directory and re-ran Eclipse installer. Same results.

Deleted the directory and re-ran Eclipse installer with the latest version from Eclipse selected. Same results.

I have no idea how to proceed now. I’ll probably try building a whole clean VM, just because there’s nothing else I can think of to do.

Any suggestions on how to get the environment to come up so I can even try to write a binding?

I built a clean Linux host. Used the package manager to install OpenJDK 11 and Maven. Used a clean download of the eclipse installer to install Eclipse 2019-06, selecting “Openhab Development” and “Openhab addons”.

Install ran without complaint.

Eclipse opened and did some stuff… didn’t seem to do the long build, though.

I can’t run app.bindrun. It won’t resolve, with the following error:

I did manage to get it to import a package (astro, because it’s simple) and get that built. No errors or anything, but still can’t launch the app.

I’ve tried several different version of Eclipse and it didn’t seem to matter.

I have no idea how to progress, and no further guidelines to follow. Any input is appreciated.

It’s just a screenshot that was made once upon a time. It should also work with the latest greatest version.

Note that you need to import any add-on project yourself as is also documented. That is because it would take ages to import all hundreds of add-ons (which you would most likely not use anyway).

Not surprised that version isn’t significant. The same screenshot also uses a version 8 JVM, which I do know is outdated. I used OpenJDK 11.

I have imported an add-on project, but can’t launch the app, as it won’t resolve. Searching around suggests that this error is caused by a bad change to a pom file, but I have made no changes to any of them.

Ah! I found the section I had missed - it’s right there in the docs, and I managed to skip it. I needed to add the binding to the pom for the demo app. And I’d missed that.

No I feel foolish, but have the app running in the debugger, and can try and start my own binding. With hopefully no more silly oversights.