[CLI] new Command: bnd dev & bnd build -watch for continuous build run workflow - #6768
Merged
Conversation
chrisrueger
force-pushed
the
bnd-dev-command
branch
from
August 20, 2025 11:37
8f85351 to
7b200a1
Compare
chrisrueger
force-pushed
the
bnd-dev-command
branch
from
September 12, 2025 17:10
7b200a1 to
be3b1a3
Compare
chrisrueger
force-pushed
the
bnd-dev-command
branch
3 times, most recently
from
September 29, 2025 19:14
bf8c434 to
488d79e
Compare
Adding ways to do a continuous build. The goal is to have an IDE-independent live coding workflow known from the javascript / npm world e.g. "vue-cli serve" which starts a dev-webserver and allows for hot code reloading when changes are detected. A workflow could look like: ``` cd mybndworkspace bnd dev mywebapp/launch.bndrun ``` or multiple .bndrun files ``` cd mybndworkspace bnd dev mywebapp/launch.bndrun mywebapp/launch2.bndrun ``` or ``` cd mybndworkspace bnd build --watch & cd mywebapp; bnd run launch.bndrun ``` Signed-off-by: Christoph Rueger <chrisrueger@gmail.com>
chrisrueger
force-pushed
the
bnd-dev-command
branch
from
September 29, 2025 19:16
488d79e to
e652eef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The goal is to have an IDE-independent live coding workflow known from the javascript / npm world e.g. "vue-cli serve" (see) which starts a dev-webserver and allows for hot code reloading when changes are detected. It should basically do the same what Eclipse "Build automatically" is doing, but without Eclipse. So I can use any text editor VSCode, vim etc.
A workflow could look like:
or multiple
.bndrunfilesThe
devcommand initially checks if any project needs rebuilding, and if yes it does a full build of the workspace before launching the bndrun files. Otherwise the bndrun files are launched immediately and the workspace is watched for changes and then rebuilt automatically.This allows e.g. to use another editor for changing java files.
or just continous build and doing the run in a separate shell process
This is basically. a combination of the three existing commands:
The current code is borrowed from the existing class
ProjectLauncher.LiveCodingand adapted it for compile-build.ProjectLauncher.LiveCodingis only for .bndrun and detects changes in .bnd / .bndrun or built .jar files and re-installs them. This is fine. What is missing is the same for a compile-build loop which creates the jars which are then detected byProjectLauncher.LiveCodingbuild and parallel build
The
buildand the newdevcommand got a (still experimental)-p, --paralleloption which can build a workspace in parallel.Web Apps and tutorials in mind
I am coming from a Web-application background and my goal is the make building web-applications with bnd much easier. I think most of the parts are there already.
So the goal of this new dev command is actually a bnd tutorial which starts with the following commands to:
Current Status
added a new command:
This mimics the same as
bnd build --watch & bnd run myappbundle/launch.bndrunon the command line. It spawns n threads - one for continous build on changes and n for running one or multiple .bndrun files which reloads the rebuilt bundles.As a quick reference here is how to do this using a full java command using the
bnd.jar