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
Include UIs and other add-ons in the demo app #577
Comments
I see the need of such a setup, but IMHO it should not be part of this (core framework) repo. The framework itself should not consume artifacts of another repository that depends itself on the framework repo. |
The "framework itself" would not depend on anything, it would just be the demo app that includes such stuff. But ok, I can of course also change the IDE setup to always checkout the distro project and put a bndrun file in there (and not import the demo.app project anymore). |
The demo app is also missing /conf/scripts and /conf/automation/jsr223 (with the demo scripts). |
@kaikreuzer, I've done my best to implement several variations of this, and while it has been a great learning experience, I have not been successful. Have you made any progress? I had several PRs to submit for openhab-core, but my IDEs are all now such a mess from the recent chnages, that any work I had done is likely lost. Hopefully, I will remember what I did and be able to recreate them. I'm specifically in need of an IDE where I can develop/debug openhab-core, while using Paper UI. This was my latest effort, and needs to be debugged/tested. |
No, I didn't make any progress myself as I am currently sick in bed :-(. I'm also a beginner in all the bnd stuff, so all I can do is also to slowly learn how to do things. Best person to ask for assistance is @maggu2810 for the time being, I am afraid... |
Sorry to hear that... hope you're back on your feet soon! I'll keep trying to get this working. Was your plan to add openhab-distro to the Core Development in the setup file (I've added it to the top, so available for all options), create a new bdrun file (and whatever else is needed) to openhab-distro, and then remove Demo from the setup file? I just want to be sure I'm headed in the right direction. |
There's nothing to fear. 😉 @openhab-5iver What is the exact problem? |
@maggu2810, I've installed an IDE with both Addon and Core too, but are you saying you have it working where you can debug modified core files while using a UI?! I specifically need Paper UI in order to debug a ConfigOptionProvider and GenericScriptEngineFactory. I cannot get the Demo app (although it sounds like this will need to be moved/recreated) to access any addons, either from openhab-distro or openhab-addons. I have no experience with bnd, and honestly, I'm not yet completely clear on the technical reason for why it is needed. But I am desperate to be able to debug core while using a UI! |
There are different options to workaround the mixture of development technologies. You can add the JARs of the local core to the target platform and use a PDE based launch configuration. You can use "Maven install" while opening the run section of the contextmenu of your Paper UI pom 's run section and add the Paper UI to a dependency section that is used by the "index" goal of the bnd indexer. Perhaps it would make sense to start migration of the Paper UI (at least as this one is used IMHO very frequently on development) to Maven + bnd. |
Let's wait for #584 it will simplify it a little bit. |
Note that I specifically mentioned that we do not support such a mixed setup (it will imho cause far too much confusion). This issue here is about adding binary artifacts, not sources to the demo app and I'd hope that this is fairly easy for the Core IDE.
FYI, I have moved all UIs to https://github.com/openhab/openhab-webui and plan to migrate them to bnd as a next step. But as stated above, this imho should not really matter.
Yes, exactly - I think this is what we need to do as @maggu2810 does not like having the core demo app depend on artifacts from other repos (although I'd consider Jetty to be a similar situation and this is included in the demo app ;-)). |
The situation differs for Jetty. Jetty does not depend on anything in openHAB Core. The demo app that is part of the openHAB Core reactor should not depend on a non-reactor artifact that itself depends on a module of the openHAB Core reactor. How do you want to resolve this cycle on e.g. a release?
|
I guess what I fail to understand is why the app.bndrun has to be part of the build at all - there is nothing specific wrt versions in there and no other artifact depends on it either. To me, the bndrun file is nothing else as the equivalent of a launch-file in PDE. Is this a wrong comparison? |
There are different points (all information here is just my understanding if I am completely wrong about bnd -- excuse me): The demo app is also a build product. A JAR file is generated on a headless (Maven) build and that file can be started on the command line. No IDE necessary for the demo application. The app.bndrun references indices: https://github.com/openhab/openhab-core/blob/363a437/demo/app/app.bndrun#L1-L3 The application contains runrequires: https://github.com/openhab/openhab-core/blob/363a437/demo/app/app.bndrun#L1-L3 The application contains runbundles: https://github.com/openhab/openhab-core/blob/363a437/demo/app/app.bndrun#L71-L180 runbundles is generated by using the resolver. If the application is started the bundles of runrequries are used. So, the indices are the fundamental part to read the capabilities and requirements of bundles and to identify the uri the bundles can be found. If you want an demo application that consumed JARs of core and addon you need an index that contains the URIs (or you need multiple separate indices). My idea has been to use another repository that contains such a demo application (e.g. the distro repo, as it consumes all the other ones and no one refers to the distro). E.g. directory layout of the git directory of the openHAB IDE (I don't care about the real names, because I don't know):
In "distro/demo" we could place index projects
The app will consume index-local and perhaps the m2 ones if they are missing in the local checkout. If the indices are generated by the Eclipse IDE correctly (I referred to the respective upstream issue already) I assume that only one index would be enough and that one can be merged into the application artifact itself |
I also vote for the full demo application to be in the distro or another repo. But I also have to point out, that without that bndrun file of the demo app, I would have had no idea within Eclipse on how to "start" the OSGi environment and to start getting things done. |
As we are getting closer to having to provide a working IDE setup for developers again, I guess we need to continue here.
Same for me, so I consider this a vital part for the IDE setup.
I think we all agree with that.
That's already the case with the openhab-distro as it up to now included the target platform definition and the PDE launch configuration - i.e. fairly similar artifacts for the same use case.
Could we put all those projects in the "launch" folder in the distro (which we should keep as it is referenced by the Eclipse Installer for the setup file). |
I don't know what's the remaining points here. What's the missing part WRT the current demo applications (except then moving it to another repo)? |
I hoped you would be able to answer. I've created openhab/openhab-distro#905, so feel free to comment. |
Launching the core through
app.bndrun
isn't really too helpful as it is lacking any UI and any other add-ons that might be helpful for testing and debugging.Would it be possible to add https://openhab.jfrog.io/openhab/libs-snapshot/ as a Maven repo and allow adding bundles from there? By default, the Paper UI + Basic UI would make sense to be included in any case.
@maggu2810 I see that you have currently selected "Standalone Mode", so I am not sure how to add such a remote repo and what (negative) effect that might have. I therefore hope for some of your insights on this.
The text was updated successfully, but these errors were encountered: