Updated dependencies, activates PMD Plugin again: new version supports Java 21.

This commit is contained in:
Konrad Neitzel 2024-05-06 12:50:24 +02:00
parent a63a795c68
commit da90bfee49
3 changed files with 24 additions and 19 deletions

20
pom.xml
View File

@ -23,7 +23,7 @@
<jar.filename>${project.artifactId}-${project.version}</jar.filename> <jar.filename>${project.artifactId}-${project.version}</jar.filename>
<!-- Dependency versions --> <!-- Dependency versions -->
<javafx.version>19.0.2.1</javafx.version> <javafx.version>21.0.3</javafx.version>
<jetbrains.annotations.version>24.1.0</jetbrains.annotations.version> <jetbrains.annotations.version>24.1.0</jetbrains.annotations.version>
<junit.version>5.10.2</junit.version> <junit.version>5.10.2</junit.version>
<lombok.version>1.18.32</lombok.version> <lombok.version>1.18.32</lombok.version>
@ -33,20 +33,20 @@
<maven.clean.plugin>3.3.2</maven.clean.plugin> <maven.clean.plugin>3.3.2</maven.clean.plugin>
<maven.compiler.plugin>3.13.0</maven.compiler.plugin> <maven.compiler.plugin>3.13.0</maven.compiler.plugin>
<maven.dependency.plugin>3.6.1</maven.dependency.plugin> <maven.dependency.plugin>3.6.1</maven.dependency.plugin>
<maven.deploy.plugin>3.1.1</maven.deploy.plugin> <maven.deploy.plugin>3.1.2</maven.deploy.plugin>
<maven.enforcer.plugin>3.4.1</maven.enforcer.plugin> <maven.enforcer.plugin>3.4.1</maven.enforcer.plugin>
<maven.install.plugin>3.1.1</maven.install.plugin> <maven.install.plugin>3.1.2</maven.install.plugin>
<maven.jar.plugin>3.3.0</maven.jar.plugin> <maven.jar.plugin>3.4.1</maven.jar.plugin>
<maven.resources.plugin>3.3.1</maven.resources.plugin> <maven.resources.plugin>3.3.1</maven.resources.plugin>
<maven.site.plugin>4.0.0-M13</maven.site.plugin> <maven.site.plugin>4.0.0-M13</maven.site.plugin>
<maven.surfire.plugin>3.2.5</maven.surfire.plugin> <maven.surfire.plugin>3.2.5</maven.surfire.plugin>
<moditect.maven.plugin>1.0.0.RC2</moditect.maven.plugin> <moditect.maven.plugin>1.0.0.RC2</moditect.maven.plugin>
<jpackage.maven.plugin>0.1.5</jpackage.maven.plugin> <jpackage.maven.plugin>0.1.5</jpackage.maven.plugin>
<maven.pmd.version>3.21.2</maven.pmd.version> <maven.pmd.version>3.22.0</maven.pmd.version>
<codehaus.version.plugin>2.16.2</codehaus.version.plugin> <codehaus.version.plugin>2.16.2</codehaus.version.plugin>
<javafx.maven.plugin>0.0.8</javafx.maven.plugin> <javafx.maven.plugin>0.0.8</javafx.maven.plugin>
<spotbugs.maven.plugin>4.8.3.1</spotbugs.maven.plugin> <spotbugs.maven.plugin>4.8.5.0</spotbugs.maven.plugin>
<spotbugs.version>4.8.3</spotbugs.version> <spotbugs.version>4.8.5</spotbugs.version>
<!-- other properties --> <!-- other properties -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -236,7 +236,6 @@
</executions> </executions>
</plugin> </plugin>
<!--
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId> <artifactId>maven-pmd-plugin</artifactId>
@ -254,12 +253,15 @@
<execution> <execution>
<phase>prepare-package</phase> <phase>prepare-package</phase>
<goals> <goals>
<!-- pmd target does not stop build when violations are found -->
<goal>pmd</goal> <goal>pmd</goal>
<!-- check stops the build when violations are found -->
<!-- <goal>check</goal> -->
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
-->
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>

View File

@ -3,7 +3,6 @@ package de.kneitzel;
import javafx.event.ActionEvent; import javafx.event.ActionEvent;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.Button;
import javafx.scene.control.TextField; import javafx.scene.control.TextField;
import java.net.URL; import java.net.URL;
@ -11,20 +10,24 @@ import java.util.ResourceBundle;
public class MainWindow implements Initializable { public class MainWindow implements Initializable {
private int counter = 0;
@FXML @FXML
private TextField textField; private TextField textField;
public Button button;
@Override @Override
public void initialize(URL url, ResourceBundle resourceBundle) { public void initialize(URL location, ResourceBundle resources) {
if (button == null) { displayCounter();
textField.setText("Button is null"); }
} else {
textField.setText("Button is not null"); private void displayCounter() {
} textField.setText("Click counter: " + counter);
} }
@FXML @FXML
private void onButtonClick(ActionEvent actionEvent) { private void onButtonClick(ActionEvent actionEvent) {
counter++;
displayCounter();
} }
} }

View File

@ -5,7 +5,7 @@
<AnchorPane prefHeight="127.0" prefWidth="209.0" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.kneitzel.MainWindow"> <AnchorPane prefHeight="127.0" prefWidth="209.0" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.kneitzel.MainWindow">
<children> <children>
<Button fx:id="button" layoutX="44.0" layoutY="70.0" mnemonicParsing="false" onAction="#onButtonClick" text="Button" /> <Button fx:id="button" layoutX="44.0" layoutY="70.0" mnemonicParsing="false" onAction="#onButtonClick" text="Click Me" />
<TextField fx:id="textField" layoutX="14.0" layoutY="24.0" /> <TextField fx:id="textField" layoutX="14.0" layoutY="24.0" />
</children> </children>
</AnchorPane> </AnchorPane>