Skip to content

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

Open
vaadin-bot wants to merge 1 commit into
25.3from
cherry-pick-27683-to-25.3-1796405918747
Open

vaadin-bot wants to merge 1 commit into
25.3from
cherry-pick-27683-to-25.3-1796405918747

Conversation

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This PR cherry-picks changes from the original PR #27683 to branch 25.3.


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.3)

**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:46
@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 439 files   - 15   1 525 suites   - 15   1h 35m 41s ⏱️ + 14m 55s
12 134 tests  - 11  12 060 ✅  - 18  67 💤 ±0  1 ❌ +1  6 🔥 +6 
12 454 runs   - 50  12 380 ✅  - 57  67 💤 ±0  1 ❌ +1  6 🔥 +6 

For more details on these failures and errors, see this check.

Results for commit f452e25. ± Comparison against base commit 36a7684.

This branch has not been deployed

No deployments
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