Migrate Designer modules and preview fixtures to Java 25

This commit is contained in:
2026-11-14 13:14:44 +01:00
parent 61a72b5cfb
commit 6227078010
29 changed files with 99 additions and 90 deletions
+9 -10
View File
@@ -4,15 +4,15 @@ This walkthrough uses NeitzelLib's `fx-example`, package `de.neitzel.fx.example`
## 1. Run the JavaFX application first
Use a full JDK 21 and Maven. From the NeitzelLib checkout:
Use a full JDK 25 and Maven. From the NeitzelLib checkout:
```sh
export JAVA_HOME=/absolute/path/to/jdk-21
mvn -B -ntp -pl fx-example -am -Dmaven.test.failure.ignore=false install
export JAVA_HOME=/absolute/path/to/jdk-25
mvn -B -ntp -pl fx-example -am install
mvn -pl fx-example javafx:run
```
**Check test reports:** NeitzelLib’s parent POM currently hardcodes `testFailureIgnore=true`; the command-line flag alone does not override it. Inspect the nonempty `target/surefire-reports/TEST-*.xml` files in core, injection, fx and fx-example and require zero failures/errors before trusting either normal or preview-profile builds. A Maven `BUILD SUCCESS` alone is insufficient.
Surefire fails the build on test failures. The XML reports record which tests ran.
The first command builds/installs the required reactor modules. The second launches only the application module; do not add `-am` to `javafx:run`, because the parent and library modules have no application entry point. The `Main` launcher calls `Application.launch(DeskApp.class, args)`. `DeskApp` creates the sample Person and injection context, then loads `view/Desk.fxml` through NeitzelLib's `ViewLoader`.
@@ -32,7 +32,7 @@ export JAVA_HOME=/absolute/path/to/jdk-25
-DincludeScope=runtime -Dmdep.outputFile=target/runtime-classpath.txt
```
This installs the Java 21 preview API, Model processor and Maven capture plugin, as well as building the shared host and worker tools. It does not build/install an IntelliJ plugin or publish artifacts remotely. The host requires JDK 25; the project-side tools and reference application use JDK 21.
This installs the Java 25 preview API, Model processor and Maven capture plugin, as well as building the shared host and worker tools. It does not build/install an IntelliJ plugin or publish artifacts remotely. The host, project-side tools and reference application require JDK 25.
`check-bootstrap.py` and `package-standalone.py` are **maintainer qualification** commands with an exact local runtime-artifact hash gate. After rebuilding/installing NeitzelLib, use the development launcher below unless that new runtime has been explicitly requalified and its provenance recorded. The [runtime baseline record](../runtime/neitzellib-baseline.md) explains the gate. Do not describe an unqualified source build as the recorded packaged release.
@@ -45,11 +45,10 @@ The current NeitzelLib checkout contains:
- `fx-example/src/designer/resources/META-INF/neitzel-fx-designer/examples.properties`: non-executing sample descriptors;
- the optional profile in `fx-example/pom.xml`: test-scoped preview API, profile-only test sources/resources and generated Model metadata.
From NeitzelLib with JDK 21, validate that optional profile:
From NeitzelLib with JDK 25, validate that optional profile:
```sh
mvn -B -ntp -pl fx-example -am -Pdesigner-preview \
-Dmaven.test.failure.ignore=false verify
mvn -B -ntp -pl fx-example -am -Pdesigner-preview verify
```
The profile generates Model metadata for Person, Address and Note. It does **not** replace the hand-written `PersonViewModel` with a generated default. Without the profile, the normal application has no Designer preview dependency. Use a clean build when switching profiles if you need to prove that profile-only test output and generated metadata have been removed.
@@ -61,7 +60,7 @@ From the Designer checkout:
```sh
python3 scripts/configure-library-example.py \
--library /absolute/path/to/NeitzelLib \
--target-java-home /absolute/path/to/jdk-21
--target-java-home /absolute/path/to/jdk-25
```
The helper writes ignored `.neitzel-fx-designer/runtimes.json` and `host.properties` under NeitzelLib. It uses the Designer Maven wrapper as the explicit fallback and current built worker-tool JARs. It refuses to overwrite existing settings; edit existing files explicitly. Machine paths belong here, not in the shared project configuration.
@@ -110,7 +109,7 @@ python3 scripts/check-library-example.py \
--library /absolute/path/to/NeitzelLib \
--app /path/to/NeitzelFXDesigner.app \
--java-home /absolute/path/to/jdk-25 \
--target-java-home /absolute/path/to/jdk-21
--target-java-home /absolute/path/to/jdk-25
```
The script copies the actual NeitzelLib checkout into a temporary directory. It builds that reactor through the real Designer, checks generated Model discovery, canvas pixels, source history/save, Component navigation and all five View-specific interactive samples. The external test agent is not shipped with the app or sample. It does not install rebuilt NeitzelLib JARs into your local Maven repository.