Repository navigation
fix(devloop): start forked servers on the chosen JDK when JDK_HOME is set - #27683
Merged
Merged
Conversation
… set Payara Server's Maven plugin reads JDK_HOME before JAVA_HOME, so an inherited JDK_HOME started the server on another JDK. The daemon now sets JDK_HOME to the same JDK as JAVA_HOME.
Contributor
Author
Type of change
How it was foundThe nightly "Flow Dev Loop (all servers)" build ran the Payara Server fixture for hours with every Maven itself ran on JDK 21 (the daemon set Test coverage
|
|
Contributor
mcollovati
added a commit
that referenced
this pull request
Dec 4, 2026
… set Temporary pick of #27683 for a nightly CI run. Remove before merging this PR.
mcollovati
marked this pull request as ready for review
December 4, 2026 12:55
vaadin-review-bot
left a comment
Collaborator
There was a problem hiding this comment.
✅ Nothing to flag — the changes look good.
mcollovati
enabled auto-merge
December 4, 2026 14:57
Artur-
approved these changes
Dec 4, 2026
vaadin-bot
added a commit
that referenced
this pull request
Dec 4, 2026
… set (#27683) (CP: 25.4) (#27690) This PR cherry-picks changes from the original PR #27683 to branch 25.4. --- > **Behavior deviation** · flow-devloop-daemon · developers and CI agents that run Payara Server with `JDK_HOME` set to another JDK > > When `JDK_HOME` points to a different JDK than the one the dev loop chose, `vaadin-dev start` on Payara Server starts the server on that other JDK. On the nightly CI agent that is Java 8, which stops at the first `--add-opens` flag, so the server never starts and every start times out. Setting `PAYARA_JAVA_HOME` is the workaround. > > **Risks:** > -⚠️ Behavior change: every Maven-launched application now gets `JDK_HOME` set to the chosen JDK, like `JAVA_HOME` already is. A plugin that read an inherited `JDK_HOME` on purpose now gets the dev loop's JDK. > - ✅ No public API, security, memory, serialization, threading, performance or migration impact. > > **Context.** The daemon already sets `JAVA_HOME` and puts the chosen JDK first on `PATH`, so that a forked server runs on it. The Payara Server Maven plugin looks at `payara.java.home`, `PAYARA_JAVA_HOME`, `JDK_HOME` and only then `JAVA_HOME`, and the TeamCity agents set `JDK_HOME` to Java 8. > > - Set `JDK_HOME` to the chosen JDK in the environment `MavenGoalRuntime` gives the Maven process > - Checked `JDK_HOME` in `MavenGoalRuntimeTest` > - Documented the variable in the forked-server section of the daemon README > Co-authored-by: Marco Collovati <marco@vaadin.com>
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.



Behavior deviation · flow-devloop-daemon · developers and CI agents that run Payara Server with
JDK_HOMEset to another JDKWhen
JDK_HOMEpoints to a different JDK than the one the dev loop chose,vaadin-dev starton Payara Server starts the server on that other JDK. On the nightly CI agent that is Java 8, which stops at the first--add-opensflag, so the server never starts and every start times out. SettingPAYARA_JAVA_HOMEis the workaround.Risks:
JDK_HOMEset to the chosen JDK, likeJAVA_HOMEalready is. A plugin that read an inheritedJDK_HOMEon purpose now gets the dev loop's JDK.Context. The daemon already sets
JAVA_HOMEand puts the chosen JDK first onPATH, so that a forked server runs on it. The Payara Server Maven plugin looks atpayara.java.home,PAYARA_JAVA_HOME,JDK_HOMEand only thenJAVA_HOME, and the TeamCity agents setJDK_HOMEto Java 8.JDK_HOMEto the chosen JDK in the environmentMavenGoalRuntimegives the Maven processJDK_HOMEinMavenGoalRuntimeTest