[SOLVED] Add openhab to existing eclipse setup


(zephod) #1

The IDE setup docs assume that you are starting from scratch but I have an existing Eclipse setup that I would like to add the openHAB setup to.
Is there a site I can add to the download sites.

I guess the alternative is to have 2 completely separate Eclipse installations.

Thanks,
Steve


(zephod) #2

Well, its taken a month but I finally figured this out myself.

So first you need make sure that Oomph is installed. As best as I can tell Oomph is a group of tools that somehow help with installation but the project documentation seems like it only makes sense if you already know what it is.

To check to see if you have Oomph installed in your Eclipse, (this is with Oxygen but I think it is the same for older versions), first select “Help->Install New Software” from the main menu. Next press the “Manage” button and check if Oomph is listed in the Available Software Sites. If not, click that “Add…” button and enter the URL given from this page https://wiki.eclipse.org/Eclipse_Installer. For some reason they have the actual site blurred out (?!?) so the site you need is http://download.eclipse.org/oomph/updates/milestone/latest. Make sure the site is enabled, then go back to the “Install New Software” page. In the “Work with” drop down menu, select the Oomph site you just added. You should see 4 options in the main part of the screen. Select them all, then press the “Next” button and follow the steps to complete the installation. In my case, not everything could be installed and it took some time for Eclipse to figure what could be installed. I also had to restart Eclipse to complete the installation.

Now that Oomph is installed, select “File->Import…” from the main menu.If Oomph installed correctly, there should be a folder called Oomph in the list. Expand it to see the one import wizard called “Projects into Workspace”. Select this and click “Next”. There should be an entry called Github Projects. Expand this and you should see a folder called openHAB. Either select the entire folder or expand it and select the parts you want. Click the “Next” button and follow on to complete the installation.
Once openHAB is downloaded, it will automatically build itself which can take a long time. Check the Progress window (Window->Show View, Progress) so see when it finishes.

I was disappointed that no one replied to my post. Perhaps it was considered too obvious by the gurus around here but I have found that what may be perfectly clear to you is not at all clear to someone else. Hopefully this will help someone out.

Steve


(firas) #3

You found the solution 3 days before I start the same process.
Thank you sir! you saved me a month of searching!


(zephod) #4

You’re welcome. Now if I can find out how to add a new runtime dependency, I’ll be able to get started. I’ve been stuck on this for a week now.
https://community.openhab.org/t/clientprotocolexception/45128/3


(Aurelio Caliaro) #5

Thank you @zephod for your solution. I am now able to add imports to eclipse.
However, whenever I try to install one of the openhab projects from GitHub (I tried with openHAB Development and openHAB 2 Add-ons) it generates a long error:

ERROR: org.eclipse.equinox.p2.director code=10054 Cannot complete the install because of a conflicting dependency.
at org.eclipse.oomph.util.OomphPlugin.coreException(OomphPlugin.java:280)
[…]
ERROR: org.eclipse.equinox.p2.director code=0 Software being installed: artificial_root 1.0.0.v1548371093471
ERROR: org.eclipse.equinox.p2.director code=1 Only one of the following can be installed at once:
ERROR: org.eclipse.equinox.p2.director code=0 Java Development Tools Core 3.14.0.xx-201901240416-e48 (org.eclipse.jdt.core 3.14.0.xx-201901240416-e48)
ERROR: org.eclipse.equinox.p2.director code=0 Java Development Tools Core 3.16.0.v20181130-1748 (org.eclipse.jdt.core 3.16.0.v20181130-1748)
ERROR: org.eclipse.equinox.p2.director code=0 Object Teams Development Tooling Core 3.16.0.OTDT_r272_201812061254 (org.eclipse.jdt.core 3.16.0.OTDT_r272_201812061254)
ERROR: org.eclipse.equinox.p2.director code=1 Cannot satisfy dependency:
ERROR: org.eclipse.equinox.p2.director code=0 From: artificial_root 1.0.0.v1548371093471
ERROR: org.eclipse.equinox.p2.director code=0 To: org.eclipse.equinox.p2.iu; org.codehaus.groovy.eclipse.feature.feature.group 0.0.0
ERROR: org.eclipse.equinox.p2.director code=1 Cannot satisfy dependency:
ERROR: org.eclipse.equinox.p2.director code=0 From: artificial_root 1.0.0.v1548371093471
ERROR: org.eclipse.equinox.p2.director code=0 To: org.eclipse.equinox.p2.iu; org.eclipse.jdt.feature.group 0.0.0
ERROR: org.eclipse.equinox.p2.director code=1 Cannot satisfy dependency:
ERROR: org.eclipse.equinox.p2.director code=0 From: Groovy-Eclipse Compilerless feature 3.3.0.xx-201901240416-e48 (org.codehaus.groovy.compilerless.feature.feature.group 3.3.0.xx-201901240416-e48)
ERROR: org.eclipse.equinox.p2.director code=0 To: org.eclipse.equinox.p2.iu; org.codehaus.groovy.headless.feature.feature.group [3.3.0.xx-201901240416-e48,3.3.0.xx-201901240416-e48]
ERROR: org.eclipse.equinox.p2.director code=1 Cannot satisfy dependency:
ERROR: org.eclipse.equinox.p2.director code=0 From: Eclipse Groovy Development Tools 3.3.0.xx-201901240416-e48 (org.codehaus.groovy.eclipse.feature.feature.group 3.3.0.xx-201901240416-e48)
ERROR: org.eclipse.equinox.p2.director code=0 To: org.eclipse.equinox.p2.iu; org.codehaus.groovy.compilerless.feature.feature.group [3.3.0.xx-201901240416-e48,3.3.0.xx-201901240416-e48]
ERROR: org.eclipse.equinox.p2.director code=1 Cannot satisfy dependency:
ERROR: org.eclipse.equinox.p2.director code=0 From: Groovy-Eclipse Headless feature 3.3.0.xx-201901240416-e48 (org.codehaus.groovy.headless.feature.feature.group 3.3.0.xx-201901240416-e48)
ERROR: org.eclipse.equinox.p2.director code=0 To: org.eclipse.equinox.p2.iu; org.codehaus.groovy.jdt.patch.feature.group [3.3.0.xx-201901240416-e48,3.3.0.xx-201901240416-e48]
ERROR: org.eclipse.equinox.p2.director code=1 Cannot satisfy dependency:
ERROR: org.eclipse.equinox.p2.director code=0 From: JDI Debug UI 3.10.100.v20181120-0542 (org.eclipse.jdt.debug.ui 3.10.100.v20181120-0542)
ERROR: org.eclipse.equinox.p2.director code=0 To: osgi.bundle; org.eclipse.jdt.core [3.15.0,4.0.0)
ERROR: org.eclipse.equinox.p2.director code=1 Cannot satisfy dependency:
ERROR: org.eclipse.equinox.p2.director code=0 From: Eclipse Java Development Tools 3.16.0.v20181206-1038 (org.eclipse.jdt.feature.group 3.16.0.v20181206-1038)
ERROR: org.eclipse.equinox.p2.director code=0 To: org.eclipse.equinox.p2.iu; org.eclipse.jdt.debug.ui [3.10.100.v20181120-0542,3.10.100.v20181120-0542]
ERROR: org.eclipse.equinox.p2.director code=1 Cannot satisfy dependency:
ERROR: org.eclipse.equinox.p2.director code=0 From Patch: org.codehaus.groovy.jdt.patch.feature.group 3.3.0.xx-201901240416-e48 Eclipse Java Development Tools 3.16.0.v20181206-1038 (org.eclipse.jdt.feature.group 3.16.0.v20181206-1038)
ERROR: org.eclipse.equinox.p2.director code=0 To: org.eclipse.equinox.p2.iu; org.eclipse.jdt.core [3.14.0.xx-201901240416-e48,3.14.0.xx-201901240416-e48]

I don’t understand this error message as I am just installing a GitHub package when this error appears… I am not aware that I have other equinox versions installed on my computer.

Any ideas around what it might be?


(Aurelio Caliaro) #6

Found out myself - same as https://github.com/openhab/openhab-distro/issues/832 . Seems to be a openhab issue that happens on all fresh installations.