Can't build current code base (repository)

I’m working on a binding for the Rachio sprinkler system and want to verify compatibility with the most recent release. So I removed the openhab-master in the file system, did a fresh install, Eclipse is fully initialized, but now I get tons of errors.

A first thing that I found out is that multiple bindings are using the JSience API, but it seems that the jar was not added to the dependencies.

Could we please make sure that

  • commits will be done only when the code builds successful
  • If new jars etc. are added to the core it should be verified with a fresh install after the commit
  • Does it make sense to point a fresh install to a stable code base (branch)? Maybe on a weekly basis, so a new developer is not impacted by the hurdle of an inconsistent snapshot.

@Kai How to fix the current problem? I don’t want to fix a dozen of projects manually?

commits will be done only when the code builds successful

I’m sure you’re the VERY FIRST person to come up with the idea that builds should be successful.

For the record, I’ve had problems building in Eclipse before when it was working for everyone else. I’ve never yet been able to figure out why that happens…

Currently, my copy is building fine.

I will check again

  • I deleted the openhab2-master directory tree
  • then run the Eclipse Installer
  • Selecting Java->all openHAB projects
  • Eclipse->Workbench, wait until everything is build

The result:


most common issue: several projects using the JScience API - javax.measure.*


I’m using macOS.

Is the an alternate branch like the code base of the last stable version (2.2). For binding developers it’s not a must to work on the latest code base. This could be the final step to verify compatibility with an upcoming release.

@namraccr Which JDK are you using?

java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

I tried again with

  • the latest Eclipse installer
  • JDK (before 121)
  • latest macOS updates
  • fresh openHAB code download

result is even more worth: more than 7000 errors! :frowning: There are many new .test projects, some major activities are going on.

It seems that some global repository / dependency definitions are missing. It doesn’t find a lot of javax.* modules, but also org.jupnp.* etc. are missing.

@Confectrician, @doume or anyone has an idea?

Could you do me a favor and try to get a fresh install, maybe it’s something with my system setup.

Attempted a fresh pull this morning, but am currently blocked by this error:

could not detach HEAD

The community knows :slight_smile:

You have to add another software site to the target platform

  • open project infrastructure->launch
  • double click
  • click on Locations->Add
  • click add->software site
  • select Software Site->Next
  • click Add
    Enter any name
  • open Maven osgi bundles
  • scroll down the list
  • checkmark all tec.unon.* and Units of Measurement*
  • Click Reload Target Platform in the upper right corner
  • Rebuild starts
  • Open project Runtime->openhab.core.karaf
  • double click on the pom.xml
  • click on the red message “Plugin execution not covered…”
    click “Mark goal highest…”

Maybe some errors are remaining, but those are related to specific bundles and could be ignored / delete the associated projects.

and go :slight_smile: