Build NeitzelLib with Java 25 and refresh dependencies

This commit is contained in:
2026-11-14 13:02:01 +01:00
parent 7581cf0b45
commit 75b733abe3
13 changed files with 57 additions and 48 deletions
+1 -1
View File
@@ -12,6 +12,6 @@ contract, including safe `toString` output. Keep Lombok compile-time-only and
preserve every annotation processor in profile-specific configurations. preserve every annotation processor in profile-specific configurations.
Run affected module tests, including FXML/reflection and generated metadata when Run affected module tests, including FXML/reflection and generated metadata when
models change. Inspect Surefire XML: the parent currently ignores test failures. models change. Inspect Surefire XML for test totals and skips.
Do not install changed runtime artifacts over a Designer-pinned baseline without Do not install changed runtime artifacts over a Designer-pinned baseline without
explicitly qualifying and recording the replacement. explicitly qualifying and recording the replacement.
+2 -2
View File
@@ -75,13 +75,13 @@ Some additions for quarkus that might be useful.
The [complete quick start](fx/docs/quick-start.md) includes local snapshot installation, a standalone Maven POM, Java classes, FXML and launch commands. Continue with [MVVM and runtime architecture](fx/docs/architecture.md), the [FXML reference](fx/README.md), and the [person desk walkthrough](fx-example/README.md). The [injection guide](injection/README.md) also covers use without JavaFX. The [complete quick start](fx/docs/quick-start.md) includes local snapshot installation, a standalone Maven POM, Java classes, FXML and launch commands. Continue with [MVVM and runtime architecture](fx/docs/architecture.md), the [FXML reference](fx/README.md), and the [person desk walkthrough](fx-example/README.md). The [injection guide](injection/README.md) also covers use without JavaFX.
Build with Java 21. Maven wrapper version is 3.9.11; the project requires Maven 3.8.6 or later. Library version `1.0-SNAPSHOT` denotes development artifacts, not a published stable release. The parent POM currently ignores Surefire failures: check test reports, as explained in the quick start, rather than relying only on Maven's exit code. Build with Java 25. Maven wrapper version is 3.9.11; the project requires Maven 3.9.11 or later. Library version `1.0-SNAPSHOT` denotes development artifacts, not a published stable release. Surefire fails the build if tests fail.
## Java source conventions ## Java source conventions
Use focused Lombok annotations for mechanical accessors, constructors and logging; Use focused Lombok annotations for mechanical accessors, constructors and logging;
see [the contributor instructions](AGENTS.md). The parent already configures see [the contributor instructions](AGENTS.md). The parent already configures
Lombok 1.18.42 as a provided dependency and an explicit annotation processor. Lombok 1.18.48 as a provided dependency and an explicit annotation processor.
It is not required at runtime. Each checkout has a `lombok.config` boundary so It is not required at runtime. Each checkout has a `lombok.config` boundary so
workstation-level settings cannot silently change generated APIs. workstation-level settings cannot silently change generated APIs.
+1 -1
View File
@@ -24,7 +24,7 @@
<dependency> <dependency>
<groupId>net.java.dev.jna</groupId> <groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId> <artifactId>jna</artifactId>
<version>5.13.0</version> <version>5.19.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.reflections</groupId> <groupId>org.reflections</groupId>
+2 -2
View File
@@ -4,14 +4,14 @@ This runnable application demonstrates [NeitzelLib FX](../fx/README.md) and [inj
## Build and run ## Build and run
From the NeitzelLib root with JDK 21: From the NeitzelLib root with JDK 25:
```bash ```bash
./mvnw -pl fx-example -am install ./mvnw -pl fx-example -am install
./mvnw -f fx-example/pom.xml javafx:run ./mvnw -f fx-example/pom.xml javafx:run
``` ```
The first command installs local `1.0-SNAPSHOT` artifacts; the second runs only the application module. Do not combine `javafx:run` with `-am`, since the parent has no JavaFX launcher. The repository currently ignores Surefire failures; verify XML reports as shown in the [quick start](../fx/docs/quick-start.md), even when Maven reports success. The first command installs local `1.0-SNAPSHOT` artifacts; the second runs only the application module. Do not combine `javafx:run` with `-am`, since the parent has no JavaFX launcher. See the [quick start](../fx/docs/quick-start.md) for test reports.
The packaged alternative, after `package` or `install`, is: The packaged alternative, after `package` or `install`, is:
+1 -1
View File
@@ -105,7 +105,7 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId> <artifactId>build-helper-maven-plugin</artifactId>
<version>3.6.1</version> <version>3.8.0</version>
<executions> <executions>
<execution> <execution>
<id>designer-preview-sources</id> <id>designer-preview-sources</id>
+7 -7
View File
@@ -16,10 +16,10 @@
You write the model, the FXML, and, where a screen needs them, a controller, reusable components, and converters. The library creates the view model. The [injection](../injection/README.md) container creates the controller, each component, and each converter. You write the model, the FXML, and, where a screen needs them, a controller, reusable components, and converters. The library creates the view model. The [injection](../injection/README.md) container creates the controller, each component, and each converter.
The worked example is the `fx-example` module, package `de.neitzel.fx.example`. From the NeitzelLib root, with Java 21: The worked example is the `fx-example` module, package `de.neitzel.fx.example`. From the NeitzelLib root, with Java 25:
```bash ```bash
./mvnw -pl fx-example -am -Dmaven.test.failure.ignore=false install ./mvnw -pl fx-example -am install
./mvnw -f fx-example/pom.xml javafx:run ./mvnw -f fx-example/pom.xml javafx:run
``` ```
@@ -33,15 +33,15 @@ These are the versions configured by this source snapshot, not a promise of comp
| Part | Baseline / relationship | Consumer responsibility | | Part | Baseline / relationship | Consumer responsibility |
| --- | --- | --- | | --- | --- | --- |
| JDK | Java 21 | Select a matching JDK for compilation and launch | | JDK | Java 25 | Select a matching JDK for compilation and launch |
| Maven | Minimum 3.8.6; wrapper 3.9.11 | Use the wrapper or an installed Maven | | Maven | Minimum 3.9.11; wrapper 3.9.11 | Use the wrapper or an installed Maven |
| Library | `de.neitzel.lib:fx:1.0-SNAPSHOT` | Install the local reactor first; no Central publication is assumed | | Library | `de.neitzel.lib:fx:1.0-SNAPSHOT` | Install the local reactor first; no Central publication is assumed |
| Internal modules | `fx` directly depends on `core` and `injection` | Resolved transitively through Maven | | Internal modules | `fx` directly depends on `core` and `injection` | Resolved transitively through Maven |
| JavaFX | 21.0.7: base, graphics, controls, FXML and web | Resolved transitively; deployment still needs platform-native artifacts | | JavaFX | 27.0.1: base, graphics, controls, FXML and web | Resolved transitively; deployment still needs platform-native artifacts |
| Injection scanning | Reflections 0.10.2 | Brought by `injection` | | Injection scanning | Reflections 0.10.2 | Brought by `injection` |
| Injection annotations | `jakarta.inject-api` 2.0.1 | Use Jakarta annotations, not `javax.inject` | | Injection annotations | `jakarta.inject-api` 2.0.1 | Use Jakarta annotations, not `javax.inject` |
| Logging | SLF4J API 2.0.17 | Choose one logging backend; the example uses `slf4j-simple` 2.0.17 at runtime | | Logging | SLF4J API 2.0.20 | Choose one logging backend; the example uses `slf4j-simple` 2.0.20 at runtime |
| Library build | Lombok 1.18.42 and test/analysis tooling | Not required in ordinary consumer source; use your own annotations only if wanted | | Library build | Lombok 1.18.48 and test/analysis tooling | Not required in ordinary consumer source; use your own annotations only if wanted |
| Designer | Optional preview API / Model processor | Needed only for the selected Designer workflow, not normal `ViewLoader` use | | Designer | Optional preview API / Model processor | Needed only for the selected Designer workflow, not normal `ViewLoader` use |
The quick-start POM adds only `fx` and a logging backend. Do not copy library build-time dependencies into an application just to obtain runtime binding. A project using injection alone needs the `injection` artifact and does not need JavaFX. The quick-start POM adds only `fx` and a logging backend. Do not copy library build-time dependencies into an application just to obtain runtime binding. A project using injection alone needs the `injection` artifact and does not need JavaFX.
+8 -8
View File
@@ -1,19 +1,19 @@
# Your first JavaFX application # Your first JavaFX application
This walkthrough creates a complete Maven project with one editable name and a label that follows it. It uses Java 21, JavaFX 21.0.7 and the current `1.0-SNAPSHOT` NeitzelLib sources. These are local development artifacts; the instructions do not assume that this snapshot is published in Maven Central. This walkthrough creates a complete Maven project with one editable name and a label that follows it. It uses Java 25, JavaFX 27.0.1 and the current `1.0-SNAPSHOT` NeitzelLib sources. These are local development artifacts; the instructions do not assume that this snapshot is published in Maven Central.
## Prepare the library ## Prepare the library
Install a JDK 21. Use the library's Maven wrapper (3.9.11), or a separate Maven installation version 3.8.6 or newer. Check `java -version` and `./mvnw -version` before building; on macOS, select the JDK with `export JAVA_HOME=$(/usr/libexec/java_home -v 21)` if necessary. Install a JDK 25. Use the library's Maven wrapper (3.9.11), or a separate Maven installation version 3.9.11 or newer. Check `java -version` and `./mvnw -version` before building; on macOS, select the JDK with `export JAVA_HOME=$(/usr/libexec/java_home -v 25)` if necessary.
```bash ```bash
git clone https://gitea.neitzel.de/konrad/NeitzelLib.git git clone https://gitea.neitzel.de/konrad/NeitzelLib.git
cd NeitzelLib cd NeitzelLib
./mvnw -pl fx-example -am -Dmaven.test.failure.ignore=false install ./mvnw -pl fx-example -am install
./mvnw -f fx-example/pom.xml javafx:run ./mvnw -f fx-example/pom.xml javafx:run
``` ```
The `install` command installs the parent POM, `core`, `injection` and `fx` into your local Maven repository and builds the example. The repository hardcodes Surefire failure-ignore, so Maven success alone does not establish passing tests, even with the explicit flag. Inspect the XML reports as shown below. The `javafx:run` command opens the [person desk example](../../fx-example/README.md). Run `javafx:run` only on the example POM, not with `-am`: the reactor parent is not a JavaFX application. The `install` command installs the parent POM, `core`, `injection` and `fx` into your local Maven repository and builds the example. Surefire fails the build when a test fails. The XML reports show which tests ran. The `javafx:run` command opens the [person desk example](../../fx-example/README.md). Run `javafx:run` only on the example POM, not with `-am`: the reactor parent is not a JavaFX application.
Check test results after the build (requires Python 3): Check test results after the build (requires Python 3):
@@ -59,7 +59,7 @@ hello-fx/
<artifactId>hello-fx</artifactId> <artifactId>hello-fx</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<properties> <properties>
<maven.compiler.release>21</maven.compiler.release> <maven.compiler.release>25</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<dependencies> <dependencies>
@@ -71,7 +71,7 @@ hello-fx/
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId> <artifactId>slf4j-simple</artifactId>
<version>2.0.17</version> <version>2.0.20</version>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
</dependencies> </dependencies>
@@ -80,7 +80,7 @@ hello-fx/
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.14.1</version> <version>3.16.0</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.openjfx</groupId> <groupId>org.openjfx</groupId>
@@ -155,7 +155,7 @@ public final class HelloApp extends Application {
<?import javafx.scene.control.TextField?> <?import javafx.scene.control.TextField?>
<?import de.neitzel.fx.view.BindingList?> <?import de.neitzel.fx.view.BindingList?>
<?import de.neitzel.fx.view.DirectBinding?> <?import de.neitzel.fx.view.DirectBinding?>
<VBox xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1" <VBox xmlns="http://javafx.com/javafx/27" xmlns:fx="http://javafx.com/fxml/1"
spacing="12" prefWidth="360" prefHeight="120"> spacing="12" prefWidth="360" prefHeight="120">
<fx:define> <fx:define>
<BindingList> <BindingList>
@@ -2,7 +2,9 @@ package de.neitzel.fx.tray;
import com.sun.glass.ui.Application; import com.sun.glass.ui.Application;
/** Isolates the JavaFX 21 native Quit hook, which has no public JavaFX equivalent. */ import java.util.Map;
/** Isolates the JavaFX native Quit hook, which has no public JavaFX equivalent. */
final class MacApplicationQuit { final class MacApplicationQuit {
private MacApplicationQuit() {} private MacApplicationQuit() {}
@@ -24,7 +26,12 @@ final class MacApplicationQuit {
@Override public void handleWillUnhideAction(Application a, long t) { if (previous != null) previous.handleWillUnhideAction(a,t); } @Override public void handleWillUnhideAction(Application a, long t) { if (previous != null) previous.handleWillUnhideAction(a,t); }
@Override public void handleDidUnhideAction(Application a, long t) { if (previous != null) previous.handleDidUnhideAction(a,t); } @Override public void handleDidUnhideAction(Application a, long t) { if (previous != null) previous.handleDidUnhideAction(a,t); }
@Override public void handleOpenFilesAction(Application a, long t, String[] files) { if (previous != null) previous.handleOpenFilesAction(a,t,files); } @Override public void handleOpenFilesAction(Application a, long t, String[] files) { if (previous != null) previous.handleOpenFilesAction(a,t,files); }
@Override public boolean handleThemeChanged(String theme) { return previous != null && previous.handleThemeChanged(theme); } @Override
public void handlePreferencesChanged(Map<String, Object> preferences) {
if (previous != null) {
previous.handlePreferencesChanged(preferences);
}
}
}; };
app.setEventHandler(handler); app.setEventHandler(handler);
return () -> { return () -> {
+1 -1
View File
@@ -20,7 +20,7 @@
<jar.filename>${project.artifactId}-${project.version}</jar.filename> <jar.filename>${project.artifactId}-${project.version}</jar.filename>
<!-- Dependency Versions --> <!-- Dependency Versions -->
<gson.version>2.11.0</gson.version> <gson.version>2.15.0</gson.version>
</properties> </properties>
<dependencies> <dependencies>
+1 -1
View File
@@ -8,7 +8,7 @@ The worked example is the person desk in `fx-example`, package `de.neitzel.fx.ex
## Quick start ## Quick start
Depend on the module. It brings Reflections 0.10.2 and `jakarta.inject-api` 2.0.1 (plus shared logging dependencies). The parent artifact is `de.neitzel.lib:neitzellib:1.0-SNAPSHOT`. Java 21. Depend on the module. It brings Reflections 0.10.2 and `jakarta.inject-api` 2.0.1 (plus shared logging dependencies). The parent artifact is `de.neitzel.lib:neitzellib:1.0-SNAPSHOT`. Java 25.
```xml ```xml
<dependency> <dependency>
+4 -2
View File
@@ -5,8 +5,10 @@
"applicationModule": "fx-example", "applicationModule": "fx-example",
"mavenProfiles": ["designer-preview"], "mavenProfiles": ["designer-preview"],
"launchMode": "classpath", "launchMode": "classpath",
"buildRuntime": "java21", "buildRuntime": "java25",
"targetRuntime": "java21", "targetRuntime": "java25",
"buildJava": 25,
"targetJava": 25,
"preview": { "preview": {
"sourceSet": "test", "sourceSet": "test",
"provider": "de.neitzel.fx.example.preview.DeskPreviewProvider", "provider": "de.neitzel.fx.example.preview.DeskPreviewProvider",
+19 -19
View File
@@ -23,39 +23,39 @@
</modules> </modules>
<properties> <properties>
<java.version>21</java.version> <java.version>25</java.version>
<required.maven.version>3.8.6</required.maven.version> <required.maven.version>3.9.11</required.maven.version>
<!-- Dependency versions --> <!-- Dependency versions -->
<jakarta-inject-api>2.0.1</jakarta-inject-api> <jakarta-inject-api>2.0.1</jakarta-inject-api>
<javafx.version>21.0.7</javafx.version> <javafx.version>27.0.1</javafx.version>
<jetbrains.annotations.version>26.0.2</jetbrains.annotations.version> <jetbrains.annotations.version>26.1.0</jetbrains.annotations.version>
<junit.version>6.0.1</junit.version> <junit.version>6.1.3</junit.version>
<lombok.version>1.18.42</lombok.version> <lombok.version>1.18.48</lombok.version>
<mockito.version>5.20.0</mockito.version> <mockito.version>5.24.0</mockito.version>
<reflections.version>0.10.2</reflections.version> <reflections.version>0.10.2</reflections.version>
<slf4j.version>2.0.17</slf4j.version> <slf4j.version>2.0.20</slf4j.version>
<!-- Plugin dependencies --> <!-- Plugin dependencies -->
<codehaus.version.plugin>2.20.1</codehaus.version.plugin> <codehaus.version.plugin>2.25.2</codehaus.version.plugin>
<javafx.maven.plugin>0.0.8</javafx.maven.plugin> <javafx.maven.plugin>0.0.8</javafx.maven.plugin>
<jpackage.maven.plugin>0.1.5</jpackage.maven.plugin> <jpackage.maven.plugin>0.1.5</jpackage.maven.plugin>
<maven.clean.plugin>3.5.0</maven.clean.plugin> <maven.clean.plugin>3.5.0</maven.clean.plugin>
<maven.compiler.plugin>3.14.1</maven.compiler.plugin> <maven.compiler.plugin>3.16.0</maven.compiler.plugin>
<maven.dependency.plugin>3.6.1</maven.dependency.plugin> <maven.dependency.plugin>3.11.0</maven.dependency.plugin>
<maven.deploy.plugin>3.1.4</maven.deploy.plugin> <maven.deploy.plugin>3.2.0</maven.deploy.plugin>
<maven.enforcer.plugin>3.4.1</maven.enforcer.plugin> <maven.enforcer.plugin>3.7.0</maven.enforcer.plugin>
<maven.install.plugin>3.1.2</maven.install.plugin> <maven.install.plugin>3.2.0</maven.install.plugin>
<maven.jar.plugin>3.5.0</maven.jar.plugin> <maven.jar.plugin>3.5.1</maven.jar.plugin>
<maven.javadoc.plugin>3.12.0</maven.javadoc.plugin> <maven.javadoc.plugin>3.12.0</maven.javadoc.plugin>
<maven.project.info.reports.plugin>3.9.0</maven.project.info.reports.plugin> <maven.project.info.reports.plugin>3.9.0</maven.project.info.reports.plugin>
<maven.resources.plugin>3.4.0</maven.resources.plugin> <maven.resources.plugin>3.5.0</maven.resources.plugin>
<maven.shade.plugin>3.5.3</maven.shade.plugin> <maven.shade.plugin>3.5.3</maven.shade.plugin>
<maven.site.plugin>4.0.0-M16</maven.site.plugin> <maven.site.plugin>4.0.0-M16</maven.site.plugin>
<maven.surfire.plugin>3.5.4</maven.surfire.plugin> <maven.surfire.plugin>3.6.1</maven.surfire.plugin>
<moditect.maven.plugin>1.0.0.RC2</moditect.maven.plugin> <moditect.maven.plugin>1.0.0.RC2</moditect.maven.plugin>
<maven.pmd.plugin>3.28.0</maven.pmd.plugin> <maven.pmd.plugin>3.28.0</maven.pmd.plugin>
<spotbugs.maven.plugin>4.9.8.2</spotbugs.maven.plugin> <spotbugs.maven.plugin>4.10.5.0</spotbugs.maven.plugin>
<!-- other properties --> <!-- other properties -->
<pmd.target>pmd</pmd.target> <pmd.target>pmd</pmd.target>
@@ -246,7 +246,7 @@
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surfire.plugin}</version> <version>${maven.surfire.plugin}</version>
<configuration> <configuration>
<testFailureIgnore>true</testFailureIgnore> <testFailureIgnore>false</testFailureIgnore>
</configuration> </configuration>
</plugin> </plugin>
+1 -1
View File
@@ -19,7 +19,7 @@
<appName>${project.artifactId}</appName> <appName>${project.artifactId}</appName>
<jar.filename>${project.artifactId}-${project.version}</jar.filename> <jar.filename>${project.artifactId}-${project.version}</jar.filename>
<quarkus.platform.version>3.30.1</quarkus.platform.version> <quarkus.platform.version>3.40.1.2</quarkus.platform.version>
</properties> </properties>
<dependencies> <dependencies>