This is no contradiction. Karaf offers to use either Felix or Equinox. We chose Equinox.
So how do I load an additional addon into the runtime?
Simply by putting it in the addons folder.
This is no contradiction. Karaf offers to use either Felix or Equinox. We chose Equinox.
So how do I load an additional addon into the runtime?
Simply by putting it in the addons folder.
Ah well, seems I was skimming the Karaf docs a bit to fastâŠ
Still I donât get how to load an addon⊠I created a new OH2 Binding Skeleton in the same folder as the other OH2 Bindings. Now do I have to build them via maven and copy the files somewhere, or can I directly debug them from within the Eclipse setup? I would especially like to test the auto discovery feature (via jmdns).
Iâm usually working in other environments (Websphere Liberty and similar), so I might need some time to adjust.
Yes, you can clearly test your binding directly in the IDE! Simply make sure it is selected on the launch configuration, see here and run the launch configuration of the runtime.
Actually peksiâs question is also what I am interested.
But for the âcheck out from git yourselfâ, I really do not have much idea about that and which github project to checkout for openhab runtime.Can you expose a little bit more details to do that if possible/necessary?
I notice that on github,there are a couple of projects,
1 openhab2-addons is for addons for openhab2
I understand we can either âmvn packageâ or import into eclipse as an existing Project.
2 openhab is for addons for openhab1
The same as above.
3 kaikreuzer/openhab-core
I guess this project is the openhab runtime source code project by this name. Also I notice there is no command line instructions in Readme.md of this project.
Is this project only for some internal use within 5 contributors or it can be and supposed to be used by some way by other developers?
Is this project the one you suggested âcheck out from git yourselfâ?
4 openhab-distro
For this project, I really have no idea what I can do.
I notice no start.sh we can find under the directoy after extracting.
Also I notice there is no command line instructions in Readme.md of this project.
Is this project only for some internal use within 10 contributors or it can be and supposed to be used by some way by other developers?
As in addition to the openhab2 addons, a openhab2 runtime is necessary, so the only thing now i can find for that is openhab-offline-2.0.0-SNAPSHOT.zip.
It doesnât look like something âcheck out from gitâ, but am I correct at this point?
Thank you very much for your concern. Any information will be greatly appreciated.
After setting up a new IDE, I can see with a âgit statusâ that I have several files modified in the following directories:
Of ocurse, I cannot run a âgit pull origin masterâ in all of these directories. What shall I do ? Remove the files tagged as âmodifiedâ (git checkout --) and then run âgit pullâ ?
Additionally, I can see in Eclipse just after the first setup that several projects are not compiling even after a full clean:
Edit: after running âgit checkout --â on all files first tagged 'unexpected) as modified and run a new âgit pull origin masterâ and finally a new clean all projects in Eclipse, I can confirm that the same compile errors in Eclipse are still present.
ok i am attempting to fix an open issue on modbus⊠followed the install directions fine but a few eclipse problemsâŠ
Project 'org.openhab.binding.smarthomatic' is missing required source folder: 'src-gen/main/java' org.openhab.binding.smarthomatic Build path Build Path Problem Project build error: Unknown packaging: eclipse-plugin pom.xml /org.openhab.action.pebble line 24 Maven pom Loading Problem src-gen/main/java/ is missing from source.. build.properties /org.openhab.binding.smarthomatic line 3 Plug-in Problem src/test/java/ is missing from source.. build.properties /org.openhab.binding.smarthomatic line 1 Plug-in Problem The folder "bin/" does not exist in the workspace build.properties /org.openhab.binding.smarthomatic line 8 Plug-in Problem The JRE container on the classpath is not a perfect match to the 'JavaSE-1.7' execution environment MANIFEST.MF /org.openhab.binding.smarthomatic/META-INF line 32 Plug-in Problem
If these are too far off topic the if someone would PM me that would be greatâŠ
@Kai
Thanks for the IDE setup guide. Iâm glad to read that the build process is âcompletely mavenizedâ and it should be possible to use other IDEs (Netbeans or Intellij IDEA) as well. Since Iâm working with Intellij for more then 12 years now I would like to stick to it and setup Intellij IDEA for developing bindings for openhab 2.
My usual starting point for setting up my IDE is a console guide. Something like:
git clone âŠ
cd âŠ
mvn âŠ
âŠ
./start.sh
Since your using maven as well I would guess that such a guide would be possible. Itâs a pitty that this information is currently hidden in this Eclipse install procedure. I assume that Eclipse users that do not want to reinstall Eclipse would be interested in such a console guide as well.
Is there any documentation (e.g. a script) about which repo has to be checked out in order to compile and run openhab 2.0 with some addons?
Did I miss a step? I get a bunch of these errors:
[ERROR] Unknown packaging: eclipse-plugin
This does not seem to be any problem with your IDE setup, but these are rather errors in the smarthomatic binding. It seems as if it was never fully checked before being merged. @teichsta, Could you have a look, please?
Note that the build uses Maven Tycho, so dependencies are resolved through p2 repositories and not Maven repos - I do not know, how well IntelliJ supports Tycho. Feel free to figure it out yourself and if you have success you can add a section in the IDE setup documentation.
Is there any documentation (e.g. a script) about which repo has to be checked out in order to compile and run openhab 2.0 with some addons?
The repos are listed here: GitHub - openhab/openhab-distro: The binary distribution of openHAB
You should only checkout and build the stuff that you want to work on, so for an openHAB 2 binding, the openhab2-addons repo is sufficient. The build result (the jar of your binding) can then be simply dropped into a normal distribution in the addons folder. Alternatively, you can build the openhab-distro yourself and it will pick up the openhab2-addons from your local Maven repo, if you have built them before.
yes, i had a look.
What i fixed is the initial checkout of the src-gen folder which works fine now. Now you get 77 errors because the generated sources are not available. These errors disappear (as with the src-gen error, too) after a full mvn clean install
.
Thanks for this information! Thatâs exactly what I needed. Iâm glad that I can remove the eclipsesmarthome repo again, since it consumes 2.5 GB on disk.
Ok I started over and created a new workspace following the instructions.
This time I did take the suggested step of opening the openHAB_Runtime" launch configuration
I get the error Project build error: Unknown packaging: eclipse-plugin
Which after a search references TycoâŠ
I am just wanting to build OH1 can anyone suggest why I am having a problem when so many seem to follow those instructions without a hitch?
When I open the POM for most packages I see eclipse-plugin listed as the âPackagingâ but eclipse-plugin is not a choice in the pull-down list
tom
git clone https://github.com/openhab/openhab.git
cd openhab
git checkout 1.8
mvn clean install
To have IDE support for pure OH1, if you really need it, you could resurrect the old IDE instructions here. But be sure you actually need it before going to the troubleâyou can do OH1 addon development and testing using the new IDE setup, and itâs much cleaner than previous.
I have the new IDE installed, I do not want to go backwards, otherwise I will have issues later.
So any suggestions on getting the maven/tyoc eclipse-plugin packaging?
I am using Ubuntu 15.04
tom
Wise. Have you just removed the failing projects from the IDE for the time being? Iâve not experienced what youâre seeing, sorry!
Ok I tried this
and it also failed⊠(i guess the only thing to do is try the OLD ide next)
Exception in thread âmainâ java.lang.NoClassDefFoundError: org/codehaus/plexus/interpolation/InterpolationException
at org.eclipse.tycho.core.osgitools.BuildPropertiesParserImpl.interpolate(BuildPropertiesParserImpl.java:117)
at org.eclipse.tycho.core.osgitools.BuildPropertiesParserImpl.parse(BuildPropertiesParserImpl.java:67)
at org.eclipse.tycho.core.osgitools.project.EclipsePluginProjectImpl.(EclipsePluginProjectImpl.java:37)
at org.eclipse.tycho.core.osgitools.OsgiBundleProject.getEclipsePluginProject(OsgiBundleProject.java:266)
at org.eclipse.tycho.core.osgitools.OsgiBundleProject.readExecutionEnvironmentConfiguration(OsgiBundleProject.java:492)
at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject(DefaultTychoResolver.java:92)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:72)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.interpolation.InterpolationException
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
⊠21 more
tom@tom:~/openHAB/openhab$
That failed tooâŠ
maybe I need to start overâŠ
I am running Ubuntu 15.04
Can anyone build on that?
I do not need the IDE for the most part, right now I just want to build and test some changes
tom
This is kind of a guess, but do you have the Oracle JDK installed or OpenJDK? The Oracle JDK might be betterâŠ
Apache Maven 3.3.3
Maven home: /usr/share/maven
Java version: 1.8.0_74, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: âlinuxâ, version: â4.2.0-30-genericâ, arch: âamd64â, family: âunixâ