Skip to content

build: upgrade plugin examples to Java 25 runtime#105

Merged
sfreudenthaler merged 2 commits into
mainfrom
java25-runtime
Jun 15, 2026
Merged

build: upgrade plugin examples to Java 25 runtime#105
sfreudenthaler merged 2 commits into
mainfrom
java25-runtime

Conversation

@sfreudenthaler

Copy link
Copy Markdown
Contributor

What

Brings the plugin seeds up to a Java 25 runtime, matching what dotCMS core now does by default (.sdkmanrc25.0.2-ms, Microsoft build).

Changes

  • .sdkmanrc (new) — pins java=25.0.2-ms, mirroring core so the build/runtime JDK is consistent.
  • Bytecode → 25maven.compiler.source/target (and release where present, e.g. viewtool) bumped to 25 across the root aggregator pom and every module pom. com.dotcms.servlet declares no compiler properties and correctly inherits the parent, so it needed no change.
  • CIactions/setup-java updated to java-version: '25' / distribution: 'microsoft' (was 21/temurin) in build-check.yml, test-install-plugins.yml, and test-on-dotcms-release.yml. release-target.yml and publish-github-release.yml don't set up Java and were left untouched.

Verification

Full reactor build on JDK 25:

./mvnw -B -ntp -DskipTests clean package

BUILD SUCCESS for all 24 modules. maven-bundle-plugin 5.1.9 processes Java 25 (class file v69) bytecode with no changes needed.

🤖 Generated with Claude Code

Brings the plugin seeds in line with dotCMS core, which now defaults to a
Java 25 runtime (.sdkmanrc -> 25.0.2-ms, Microsoft build).

- Add .sdkmanrc pinning java=25.0.2-ms to match core's build/runtime JDK
- Bump maven.compiler.source/target (and release where present) to 25 across
  the root aggregator pom and all module poms (com.dotcms.servlet inherits
  from the parent and needed no change)
- CI: setup-java -> java-version 25, distribution microsoft (was 21/temurin)
  in build-check, test-install-plugins, and test-on-dotcms-release workflows

Verified: full reactor `./mvnw -DskipTests clean package` builds all 24
modules successfully on JDK 25 (maven-bundle-plugin 5.1.9 handles class
file v69 with no changes needed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sfreudenthaler

Copy link
Copy Markdown
Contributor Author

⚠️ CI test-plugins is red — bytecode-25 breaks OSGi activation

build passes, but test-plugins fails: 21 of 22 plugins fail to activate in the live dotCMS container (stuck INSTALLED, not ACTIVE).

Root cause (confirmed)

maven-bundle-plugin 5.1.9 (and even the latest 6.0.2) embeds a bnd whose execution-environment table doesn't know Java 25 class files (v69). So it stamps every bundle with:

Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)"

dotCMS's OSGi/Felix framework can't satisfy osgi.ee=UNKNOWN, so the bundles never resolve. (viewtool is the lone survivor — its bnd config emits JavaSE-11.) The local mvn package succeeded because this only surfaces at OSGi runtime resolution, which only test-plugins exercises.

This is the same class of problem dotCMS core sidesteps by keeping its bytecode release at 11 while running on the Java 25 runtime.

Options (decision needed)

  1. _noee:true — add to each module's maven-bundle-plugin <instructions>. Suppresses the EE requirement entirely; bundles resolve regardless of framework Java. ✅ Verified locally: removes the UNKNOWN header. Minimal, but semantically drops the EE declaration.
  2. Migrate to bnd-maven-plugin 7.3.0 — modern bnd knows v69 and would emit a correct osgi.ee=JavaSE;version=25. Proper, but a larger tooling change (and requires the dotCMS runtime to advertise JavaSE-25).
  3. Keep runtime 25, lower bytecode to 21 (or 11) — mirrors core's stance: .sdkmanrc/CI stay on Java 25, but maven.compiler.release stays portable so bnd 5.1.9 produces a valid EE.

The .sdkmanrc + CI (Java 25 / microsoft) changes in this PR are correct and orthogonal — only the bytecode level + bundle-plugin interaction needs a decision.

…Java 25

The Java 25 upgrade (68dc2ff) made 21/22 plugins fail OSGi activation: they
installed but never resolved (state INSTALLED/2 instead of ACTIVE/32).

Root cause: maven-bundle-plugin 5.1.9 embeds bnd 6.3.1, which does not
recognize class file major version 69 (Java 25). bnd therefore emitted

    Require-Capability: osgi.ee;filter:="(osgi.ee=UNKNOWN)"

into each bundle manifest. The dotCMS Felix framework never exports an
osgi.ee capability named UNKNOWN, so the resolver could not satisfy the
requirement and the bundles stuck at INSTALLED. Only com.dotcms.viewtool
passed because its maven-compiler-plugin pins <release>11</release>, yielding
class v55 which bnd maps to a valid osgi.ee=JavaSE;version=11.

Fix: add bnd instruction <_noee>true</_noee> to every bundle module, which
suppresses generation of the osgi.ee Require-Capability header. Verified the
full reactor builds on JDK 25 and no produced jar contains an osgi.ee
Require-Capability line.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sfreudenthaler sfreudenthaler merged commit 98a1cbc into main Jun 15, 2026
2 checks passed
@sfreudenthaler sfreudenthaler deleted the java25-runtime branch June 15, 2026 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant