Eclipse IDE Setup (Problem following docs)

So I’d like to do some openhab development, my end goal is to build openhab and the addons and run it (so I can try patching an addon)

Anyways, I’m not familiar with eclipse, and the setup directions don’t really seem to make sense. I installed eclipse through my distro’s package manager, so I open it and I get a blank welcome thing. There is never a question that lets me select “Openhab development” during install or through the some project installer. The openhab setup directions seem to imply you just install eclipse, then at some point it asks what you want and you just select openhab which never happens.

Where I am now is I tried cloning a bunch of repos, and I found out that clicking “File->Import”, and do “from git (smart)” lets me clone openhab-distro, that seems to get me to the next screen in the directions where I see app.bndrun. After installing a bunch of eclipse plugins (not in the openhab docs) I get it to open, but I still can’t run it. Specifically I see these warnings:

Description Resource Path Location Type
Build path specifies execution environment JavaSE-11. There are no JREs installed in the workspace that are strictly compatible with this environment. org.openhab.demo.app Build path JRE System Library Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:assembly (execution: default-assembly, phase: process-resources) pom.xml /openhab line 108 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:features-generate-descriptor (execution: default-features-generate-descriptor, phase: compile) pom.xml /addons line 19 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:features-generate-descriptor (execution: default-features-generate-descriptor, phase: compile) pom.xml /distro line 36 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:features-generate-descriptor (execution: default-features-generate-descriptor, phase: compile) pom.xml /distro-kar line 29 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:features-generate-descriptor (execution: default-features-generate-descriptor, phase: compile) pom.xml /openhab-addons line 49 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:features-generate-descriptor (execution: generate-features-file, phase: generate-resources) pom.xml /addons line 34 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:features-generate-descriptor (execution: generate-features-file, phase: generate-resources) pom.xml /distro line 51 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:features-generate-descriptor (execution: generate-features-file, phase: generate-resources) pom.xml /distro-kar line 51 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:features-generate-descriptor (execution: generate-features-file, phase: generate-resources) pom.xml /openhab-addons line 71 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:verify (execution: default-verify, phase: compile) pom.xml /addons line 19 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:verify (execution: default-verify, phase: compile) pom.xml /distro line 36 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:verify (execution: default-verify, phase: compile) pom.xml /distro-kar line 29 Maven Project Build Lifecycle Mapping Problem
Plugin execution not covered by lifecycle configuration: org.apache.karaf.tooling:karaf-maven-plugin:4.3.7:verify (execution: default-verify, phase: compile) pom.xml /openhab-addons line 49 Maven Project Build Lifecycle Mapping Problem
Project ‘distributions’ has no explicit encoding set distributions /distributions No explicit project encoding
Project ‘launch’ has no explicit encoding set launch /launch No explicit project encoding
The compiler compliance specified is 11 but a JRE 17 is used org.openhab.demo.app Compiler Compliance JRE Compiler Compliance Problem

And trying to just run it anyways gets me a whole bunch of errors (like all the dependencies are missing), an example error is:

Status ERROR: org.bndtools.launch code=0 org.ops4j.pax.logging.pax-logging-api;version=[2.0.16,2.0.17) Not found in [bnd-cache [/home/edman007/.bnd/default-ws/cnf/cache/6.3.1/bnd-cache r/w=false]]

That’s repeated for every single thing in the Maven Dependencies directory…so I’m a bit confused.

So can someone help, I suspect either I’m cloning/importing the project incorrectly or there is some special button that needs to be run to download all the dependencies.

Do you mean the eclipse setup documentation page ?: Eclipse IDE | openHAB
And if so what isn’t you did not understand?

If you install eclipse via your distribution you’ll get the eclipse provided with your distribution. This will skip the eclipse installer and explains why you didn’t see any openHAB options.

If you go to install via the eclipse installer don’t select the latest eclipse, but take an older version, as there seems to be some issue with recent versions of eclipse and openHAB development.

So I installed “Java IDE for developers”, so starting at the next step:

  1. In step 6 I don’t have a Github Projects menu, is this supposed to be via the File->Import Menu? That’s the closest I have, but there is no Github Projects, the following step, step 7, seems related to that and again I don’t get that. Can this be accessed some other way?
  2. I assumed that i just need to clone it from github, is openhab-distro the correct top level repository to clone? There is no Openhab Development repository on github
  3. Step 8 says accept licenses, cloning from git doesn’t install plugins/extensions, I had to install bndtools manually, is there other SW that’s required to be installed into eclipse other than bndtools? Is there some automatic way to select these?
  4. Under “Running addons” it says “under the infrastructure folder”, I don’t have an Infrastructure folder, is it important? How do i get it?
  5. When I get to step 2 of the addon’s section, adding a dependency gives me a pom error that it can’t find the dependency…anyways, I’m continuing without any addons because I want it to run
  6. At step 3 it says I should have stuff in browse repos, but I don’t, the only error I have is Maven reports it can’t find any of the dependencies in bnd-cache, nothing ever told me how to download those dependencies (but they appear to be in the Maven dependency folder that eclipse shows), how do I download them and get them in the cache? This appears to be an eclipse configuration error that isn’t documented in the openhab documentation.

As for the eclipse version, do you have a recommended version to install? I’m on 2022.09 right now

[Edit]
Downgraded to 2022.03, same issues so far, however with a few other imports and exports, the first time it’s imported I also get this error

No marketplace entries found to handle karaf-maven-plugin:4.3.7:assembly in Eclipse. Please see Help for more information.

I’m guessing I have to install that into eclipse…but eclipse doesn’t handle it automatically? That wasn’t in the docs either.

Once you have imported the project, you probably need to execute the right click menu command Maven | Update Project …

Alright, figured it out

I had JDK11 installed, but eclipse didn’t see it and tried to use whatever eclipse shipped with which understandably made everything upset.

So set JDK11 as the default in Window->Preferences->Java->Installed JREs, then import the openhab-distro github repo (that threw a few errors about karaf-maven-plugin which I ignored). Then I ran app.bndrun, that told me to install bndtools, restart eclipse, and then right click on org.openhab.demo.app and Maven->Update Project. I did this using eclipse 2022.03, and I guess that version crashes after installing bndtools. But it works otherwise.

I’ve created an issue for newer Eclipse versions failing to install properly:

Seems like Eclipse 2022-12 also requires Java 17 now.

The docs were also recently updated to prevent issues by adding an instruction to install one of the older Eclipse versions.

2 Likes

Hello,

I used version 12/2021 but get this error

Description	Resource	Path	Location	Type
Missing artifact org.eclipse.orbit.bundles:net.i2p.crypto.eddsa:jar:0.3.0.v20220506-1020	pom.xml	/org.openhab.demo.app	line 3	Maven Dependency Problem

Is here any help available?

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.