-
-
Notifications
You must be signed in to change notification settings - Fork 391
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
Add bnd-run target #1707
Add bnd-run target #1707
Conversation
This allows running the demo project from the command line, using the bnd maven plugin. mvn bnd-run:run You can also add an agent to remote debug openHAB, and even hotswap : mvn -D-runjdb=10001 package bnd-run:run This is very useful when using Intellij IDEA or IDEs other than Eclipse. Signed-off-by: Gwendal Roulleau <[email protected]>
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.
Would be useful when it works!
Though it doesn't start at all for me when running mvn bnd-run:run
Lot's of bundles cannot be resolved:
! could not resolve the bundles: [org.openhab.core-5.0.0.202412241339 org.osgi.framework.BundleException: Could not resolve module: org.openhab.core [120]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=21))"
, org.openhab.core.addon-5.0.0.202412241339 org.osgi.framework.BundleException: Could not resolve module: org.openhab.core.addon [121]
Unresolved requirement: Import-Package: org.openhab.core.common; version="[5.0.0,6.0.0)"
-> Export-Package: org.openhab.core.common; bundle-symbolic-name="org.openhab.core"; bundle-version="5.0.0.202412241339"; version="5.0.0"
org.openhab.core [120]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=21))"
Unresolved requirement: Import-Package: org.openhab.core; version="[5.0.0,6.0.0)"
-> Export-Package: org.openhab.core; bundle-symbolic-name="org.openhab.core"; bundle-version="5.0.0.202412241339"; version="5.0.0"; uses:="org.osgi.framework"
It starts without any issues in Eclipse.
After making some changes to my .bashrc file it now does properly find Java 21 and it is able to start the bundles. 🙂 |
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.
Thanks! Would be nice if you can add some docs for this so devs can discover and use it.
Also see openhab/openhab-distro#1707 Signed-off-by: Gwendal Roulleau <[email protected]>
Also see openhab/openhab-distro#1707 Signed-off-by: Gwendal Roulleau <[email protected]>
Also see openhab/openhab-distro#1707 Signed-off-by: Gwendal Roulleau <[email protected]>
Also see openhab/openhab-distro#1707 Signed-off-by: Gwendal Roulleau <[email protected]>
Also see openhab/openhab-distro#1707 Signed-off-by: Gwendal Roulleau <[email protected]>
Also see openhab/openhab-distro#1707 Signed-off-by: Gwendal Roulleau <[email protected]>
* [development] Adding generic, maven based run and debug. Also see openhab/openhab-distro#1707 Signed-off-by: Gwendal Roulleau <[email protected]> * [development] Adding generic, maven based run and debug. Apply MR comments Signed-off-by: Gwendal Roulleau <[email protected]> * [development] Adding generic, maven based run and debug. Apply MR comments Signed-off-by: Gwendal Roulleau <[email protected]> --------- Signed-off-by: Gwendal Roulleau <[email protected]>
This allows running the demo project from the command line, using the bnd maven plugin.
mvn bnd-run:run
You can also add an agent to remote debug openHAB, and even hotswap with your IDE :
mvn -D-runjdb=10001 package bnd-run:run
I'm no expert, and unless I missed something obvious, this seems the best (essential) way to develop/run/debug with Intellij IDEA or IDEs other than Eclipse. If accepted, I think I should also update the Intellij IDEA page from documentation to include this.