-
-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce full bnd-based IDE setup #905
Conversation
Signed-off-by: Kai Kreuzer <kai@openhab.org>
There are still OH1 repo maintainers aren't there? It only took longer in OH2-addons because we used maven dependencies to get rid of most embedded lib jars and needed to overcome a lot of OSGi bundling problems. For OH1-addons that effort doesn't need to be done I guess. |
In theory yes, in practice there are many open PRs and issues and not that much activity... So your suggestion is to migrate openhab1-addons as well. I have no clue, how many obstacles might be on this way - it is a huge repo with a lot of (old) code, the open PRs will break and I don't know about the potential risk that something breaks and nobody notices it quickly (the code e.g. uses DS XMLs, has bundle Activators, etc.). My fear is, that a migration can take very long and will mean a lot of manual work. |
Signed-off-by: Kai Kreuzer <kai@openhab.org>
@kaikreuzer I see no issues with bacnet binding - it has public maven central dependencies and can be ported to basic maven (BOM organized) build easily - with bnd or maven-bundle-plugin. In fact I initially did it with second, then bound it back to tycho parent. |
IMHO we should add DS requirements first (e.g. by openhab/openhab-core#595) |
Cool, so feel free to adapt it and I can keep the IDE setup option in place for it.
Is this a prerequisite or just something that "should" also be in place asap? It seems to me that the IDE setup can already work even without it being merged? |
If people modifies the run requirements of the bndrun flie, they need to run the Bnd resolver (e.g. by press "resolve" in the UI), so the run bundles list is regenerated. This will not work as expected as long as the DS requirements are disabled in core. So, the unmodified openHAB demo will work, but as soon as someone adds its own bundles or would like to add other existing bundles, this will not work as expected. |
I see, thanks for the explanation! |
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
Signed-off-by: Kai Kreuzer <kai@openhab.org>
@maggu2810 I still have problems with the demo app in here. Trying to launch it I get Where are those artifacts supposed to be loaded from and why aren't they found? Do you have a hint? |
launch/app/pom.xml
Outdated
@@ -1,107 +1,120 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought we use two-space indentation in poms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used the IDE formatter, in which we defined to use tabs for XML files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced by 2 spaces
In openHAB Core we follow the POM file convention for two spaces indentation, as we did previously in ESH. Regardless what has been choosen for things etc. xml files. I don't have access to a PC this weekend. |
Signed-off-by: Kai Kreuzer <kai@openhab.org>
@openhab/distro-maintainers I think this can be merged and issues that occur can then be addressed by individual PRs. |
As there's no veto, allow me to merge so that we can move forward on this! |
@openhab/core-maintainers & @openhab/2-x-add-ons-maintainers, I am pretty frustrated, maybe you can help: |
I see the lagging Run-OSGi (exactly at 31% like yours) on one machine but not on another (which has less power than the lagging one). I can‘t say what the difference in setup is. |
I have the same bad experience if I add everything. That's why I only add the absolute minimum into the workspace. There is also https://github.com/openhab/openhab2-addons/issues/5554 (Eclipse Autobuild builds forever). m2e and bndtools don't seem to like each other at the moment. |
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
I just tried the new OOMPH setup with openhab-addons and openhab development. It checks out everything fine (though it takes a while). Compilation also works, except for a few errors on the marytts addon, which complains about missing libraries. I also see the hang on 31% if I right click on "app.bndrun" and select "Run as OSGi Run launcher". But after about a minute a pop-up opens with a lot of OSGi errors:
|
@triller-telekom Do you maybe have some settings.xml in place that prevents a proper download of the dependencies from Maven Central? It all resolves nicely for me (and the others). @maggu2810 Do you also see the 31% hanging when launching the app? This is imho pretty annoying as it slows down dev round trips quite a bit - I'd hope there's some solution to it. |
My progress view shows "Launching: Build before launch - Performing required build..." on 31%. If you disable the option "Build (if required) before launching" you will see something similar like that in your console view:
But hey, the option contains the phrase "if required", so this is not really unexpected. I assume this kind of behaviour needs to be reported to the Bnd guys and it needs to be discussed there is the situation can be improved. |
You could check if something similar to this improves the situation (the time needed to start and the time needed to resolve) a little bit. |
Unfortunately, this does not seem to make any difference 😞. |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/maven-bnd-migration-and-eclipse-formatter/74609/2 |
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/problem-install-eclipse-ide/75140/19 |
So we don't have to update the year in the license file header every time. These seem to be some leftovers from trying to get the IDE based launch config working in openhab#905. Signed-off-by: Wouter Born <github@maindrain.net>
So we don't have to update the year in the license file header every time. These seem to be some leftovers from trying to get the IDE based launch config working in #905. Signed-off-by: Wouter Born <github@maindrain.net>
As nearly all openhab2 add-ons have been migrated to bnd, the existing IDE setup that uses Tycho isn't really usable anymore - we must hence provide an updated IDE setup through which it is again possible to do add-on development.
Disclaimer: I myself still feel a bit lost in the bnd world and I am not having a decent development environment since January anymore - this made me pretty inefficient over the past months and I hope we can overcome this situation soon.
As I am not fully clear on the target picture for the IDE setup, I hope for input and contributions to this PR by all contributors driving the bnd change.
As a starting point, I have adapted the Oomph setup file to use bnd for all development and to checkout the correct repos.
As suggested here, I have moved the demo app to openhab-distro, so that it should become possible to start openHAB from within the IDE as a replacement for the former launch configuration.
What I am not yet clear on:
Closes openhab/openhab-core#577
Signed-off-by: Kai Kreuzer kai@openhab.org