diff --git a/.vuepress/docs-sidebar.js b/.vuepress/docs-sidebar.js index efa4b8d3bc..69252c1ca3 100644 --- a/.vuepress/docs-sidebar.js +++ b/.vuepress/docs-sidebar.js @@ -212,7 +212,15 @@ module.exports = [ title: 'Developer Guide', collapsable: true, children: [ - ['developer/', 'Overview & Introduction'], + { title: 'IDEs', + collapsable: true, + children: [ + 'developer/eclipse', + 'developer/intellij', + 'developer/vscode', + 'developer/generic', + ] + }, 'developer/guidelines', 'developer/addons/', 'developer/bindings/', diff --git a/developers/ide/generic.md b/developers/ide/generic.md index 60ff51e9e0..f37aab9505 100644 --- a/developers/ide/generic.md +++ b/developers/ide/generic.md @@ -23,22 +23,26 @@ will be available in your local repository and the demo project will be able to ### Build project +::: Warning Versions +Make sure you meet the prerequisites like the Java and Maven version. As of openHAB 5.x Java 21.x is required and at least mvn 3.8.6. +::: + Use Maven to build the projects you want to develop for. It is important to use the `mvn install` option to copy the artifact in your local repository. ### Preparation There are two files to take care of: -- `/openhab-distro/launch/app/pom.xml` must contain the artifact you are developing in the dependencies section. +- `/openhab-distro/launch/app/pom.xml` must contain the artifact you are developing in the dependencies section (search for "uncomment this and add the name of your binding that you want to work on") -- `/openhab-distro/launch/app/app.bndrun` will list the modules needed by the OSGi runtime. You also have to add your add-on in the `runrequires` section. +- `/openhab-distro/launch/app/app.bndrun` will list the modules needed by the OSGi runtime. You also have to add your add-on in the `runrequires` section (e.g. `bnd.identity;id='org.openhab.binding.YOURBINDINGNAME'` and don't forget to add the `\` to the previous line if you adding it to the end of the list) After editing this two files, use this maven command from the `/openhab-distro/launch/app/` directory: `mvn bnd-resolver:resolve` -This will ask the bnd plugin to 'resolve' the dependencies, i.e. to calculate what to run in the OSGi runtime. -This task will update the `runbundles` section of the `app.bndrun` file. +This will ask the bnd plugin to 'resolve' the dependencies (i.e. to calculate which bundles to run in the OSGi runtime) and update + the `runbundles` section of the `app.bndrun` file accordingly. Each time you add a dependency or change version, you HAVE to run a resolve task. ::: warning @@ -58,12 +62,15 @@ To launch the demo app, using the content of the `app.bndrun` file: `mvn bnd-run:run` +You can now open the app in your browser via http://localhost:8080/. + To launch in debug mode: `mvn -D-runjdb=10001 package bnd-run:run` Wait for the process to pause and show the log `Listening for transport...` then attach your IDE to the remote debugging -session (here, on port 10001). The openHAB demo project startup process will then resume. +session (here, on port 10001). The openHAB demo project startup process will then resume and you will be able to +open it in your browser. Each modification of your code requires rebuilding your add-on with `mvn clean install` so that it is deployed in your local repository and accessible for the next execution. diff --git a/developers/ide/images/generic_ide.pdn b/developers/ide/images/generic_ide.pdn index 0df64dbe05..931f2dfef9 100644 Binary files a/developers/ide/images/generic_ide.pdn and b/developers/ide/images/generic_ide.pdn differ diff --git a/developers/ide/images/generic_ide.png b/developers/ide/images/generic_ide.png index 118c98454f..39cf58d19e 100644 Binary files a/developers/ide/images/generic_ide.png and b/developers/ide/images/generic_ide.png differ diff --git a/developers/ide/intellij.md b/developers/ide/intellij.md index 3e8b7fde8a..a1286ab840 100644 --- a/developers/ide/intellij.md +++ b/developers/ide/intellij.md @@ -7,7 +7,7 @@ title: IntelliJ ## Prerequisites -- git, Maven, IntelliJ and Java 17 are installed +- git, Maven (at least 3.8.6), IntelliJ and Java (21) are installed and available in the path. ## Build the repositories @@ -25,13 +25,13 @@ Use the command `git clone https://github.com//openhab-