Fresh install Eclipse & Openhab Git, javax.measure missing?

Hello,

I would like to build my first binding. I installed Eclipse using this OH manual. Followed every step. When the workspace build has finished, I notice two things:

  • Maven is not enabled on the projects
  • ‘javax.measure’ cannot be resolved

jsr-275 is in the global Maven Repository, should I add it to every project?

Regards,
Bastiaan

Did you find the solution to this? Don’t think we should be adding javax.measure to all the sub projects

The openHAB target platform still needs to be updated to include javax.measure. What helps is to reload and switch to the Eclipse SmartHome target platform.

See also this discussion in the Quantity Type PR.

@Kai do you already have some plans to create a new ESH stable so we can use the Quantity Type in openHAB 2.3.0-SNAPSHOT as well?

@wborn Not yet decided on when to do the next ESH stable as it might cause some disruptions (UoM is a major refactoring).
@bastiaan_van_h You should not need javax.measure, if you do not have any ESH projects in your workspace. Assuming you want to do binding development, there is actually no need to have them there, so you can simply close or remove them and all should be fine.

I can neither setup openhab nor ESH in eclipse with no errors.
I can not build ESH in eclipse nor with maven. When trying to start Runtime.launch i get errors.
Same goes for OpenHAB but starting Runtime.launch complains but runs a least somehow.

Could anyone responsible just setup openHAB and EHS a fresh environment (starting with a clean VM) and just make a step for step tutorial! And please mention all the obvious steps. I would apriciate it.

@Kai either what is fetched from git when installing is not a stable master or it is somehow corrupted.
So javax.measure is in core for me i do not understand .

And for ESH
grafik

So a guide to get a working setup with no errors would be apriciated.

The guide is here: https://www.eclipse.org/smarthome/documentation/development/ide.html

Is that what you have done?

His errors are the same as mine due to missing “javax.measure”. Runtime workspace works fine, but the other workspaces arent working.

@Kai that´s exactly what i have done.

There are lots of errors from classes which are empty and reference to abstract classes which are not existent. Seems something with the model generation went wrong?

And all projects with org.eclipse.smarthome.model are showing errors.

class SitemapIdeModule extends AbstractSitemapIdeModule {
}

Maybe this will get us in the right direction.

@kai @bastiaan_van_h i had multiple Java JDKs installed.

Removed all JRE/JDK, installed only 1.8.0_162 change windows path, JAVA_HOME. cleaned C:\Users\<UserName>\.m2 and C:\Users\<UserName>\.eclipse

Reinstalled eclipse with the smarthome repo and got it running after a mvn clean install.

There are multiple configuration points where the right path has to be set. The proccess described above makes sure, or did for me, that all path configurations are reseted and can be set during the fresh installation.

Hope this helps anyone with a similar problem.

check out Can't build current code base (repository)

this fixes the problem with import javax.measure.* and tec.unon.* by adding the 3rd party bundle software site. @Kai This should be fixed in the Eclipse Installation definition.