Skip to content

fix(devloop): start forked servers on the chosen JDK when JDK_HOME is set (#27683) (CP: 25.4) - #27690

Merged
vaadin-bot merged 1 commit into
25.4from
cherry-pick-27683-to-25.4-1796405912226
Dec 4, 2026
Merged

vaadin-bot merged 1 commit into
25.4from
cherry-pick-27683-to-25.4-1796405912226

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

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

… set (#27683) (CP: 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
@github-actions github-actions Bot added the +0.0.1 label Dec 4, 2026
@vaadin-bot

Copy link
Copy Markdown
Collaborator Author

This PR is eligible for auto-merging policy, so it has been approved automatically. If there are pending conditions, auto merge (with 'squash' method) has been enabled for this PR [Message is sent from bot]

@vaadin-bot
vaadin-bot enabled auto-merge (squash) December 4, 2026 17:51
@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Test Results

 1 662 files   - 33   1 753 suites   - 33   1h 44m 18s ⏱️ - 5m 41s
14 125 tests  -  3  14 053 ✅  -  3  72 💤 ±0  0 ❌ ±0 
14 561 runs   - 76  14 489 ✅  - 76  72 💤 ±0  0 ❌ ±0 

Results for commit a5a4ff1. ± Comparison against base commit d3a8507.

@vaadin-bot
vaadin-bot merged commit c20e6ff into 25.4 Dec 4, 2026
58 checks passed
@vaadin-bot
vaadin-bot deleted the cherry-pick-27683-to-25.4-1796405912226 branch December 4, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants