Skip to content

Commit 2d0537a

Browse files
committed
Build on Java 25
1 parent 71402e7 commit 2d0537a

8 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/actions/modernizer-action/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828
uses: s4u/setup-maven-action@v1.18.0
2929
with:
3030
java-distribution: 'temurin'
31-
java-version: 21
31+
java-version: 25
3232
maven-version: 3.9.12
3333
cache-enabled: true
3434
checkout-enabled: false

.github/workflows/cd.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
uses: actions/setup-java@v5
6868
with:
6969
distribution: temurin
70-
java-version: 21
70+
java-version: 25
7171

7272
# https://github.com/jenkins-infra/github-reusable-workflows/issues/36
7373
- name: Set up Maven

.mvn/jvm.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--sun-misc-unsafe-memory-access=allow

.sdkmanrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
java=21.0.8-tem
1+
java=25.0.1-tem
22
maven=3.9.12

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
buildPlugin(
55
useContainerAgent: false,
66
configurations: [
7-
[platform: 'linux', jdk: 21],
8-
[platform: 'windows', jdk: 21],
7+
[platform: 'linux', jdk: 25],
8+
[platform: 'windows', jdk: 25],
99
])

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ With over 2000 plugins in Jenkins, keeping them updated manually is a daunting t
7777

7878
### Requirements
7979
- Maven version 3.9.12 or later, or mvnd
80-
- Java 21 ([Eclipse Temurin](https://adoptium.net/temurin/releases) recommended)
80+
- Java 25 ([Eclipse Temurin](https://adoptium.net/temurin/releases) recommended)
8181

8282
### Build
8383

plugin-modernizer-core/src/main/java/io/jenkins/tools/pluginmodernizer/core/impl/PluginModernizer.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ private void process(Plugin plugin) {
249249
plugin.checkoutBranch(ghService);
250250

251251
// Minimum JDK to run openrewrite
252-
plugin.withJDK(JDK.JAVA_21);
252+
plugin.withJDK(JDK.JAVA_25);
253253

254254
// Collect metadata and move metadata from the target directory of the plugin to the common cache
255255
if (!plugin.hasMetadata() || config.isFetchMetadataOnly()) {
@@ -360,7 +360,7 @@ private void process(Plugin plugin) {
360360

361361
// Recollect metadata after modernization
362362
if (!config.isFetchMetadataOnly()) {
363-
plugin.withJDK(JDK.JAVA_21);
363+
plugin.withJDK(JDK.JAVA_25);
364364
plugin.clean(mavenInvoker);
365365
collectMetadata(plugin, false);
366366
LOG.debug(
@@ -439,7 +439,7 @@ private void process(Plugin plugin) {
439439
*/
440440
private void collectMetadata(Plugin plugin, boolean retryAfterFirstCompile) {
441441
LOG.trace("Collecting metadata for plugin {}... Please be patient", plugin.getName());
442-
plugin.withJDK(JDK.JAVA_21);
442+
plugin.withJDK(JDK.JAVA_25);
443443
try {
444444
plugin.collectMetadata(mavenInvoker);
445445
if (plugin.hasErrors()) {
@@ -458,7 +458,7 @@ private void collectMetadata(Plugin plugin, boolean retryAfterFirstCompile) {
458458
plugin.getName());
459459
plugin.raiseLastError();
460460
}
461-
plugin.withJDK(JDK.JAVA_21);
461+
plugin.withJDK(JDK.JAVA_25);
462462
plugin.collectMetadata(mavenInvoker);
463463
} else {
464464
LOG.info("Failed to collect metadata for plugin {}. Not retrying.", plugin.getName());
@@ -562,7 +562,7 @@ private JDK verifyPlugin(Plugin plugin) {
562562
// Determine the JDK
563563
JDK jdk;
564564
if (metadata.getJdks() == null || metadata.getJdks().isEmpty()) {
565-
jdk = JDK.JAVA_21;
565+
jdk = JDK.JAVA_25;
566566
LOG.info(
567567
"No JDKs found in metadata for plugin {}. Using same JDK as rewrite for verification",
568568
plugin.getName());

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
<!-- Reproducible builds -->
3737
<project.build.outputTimestamp>2024-01-01T00:00:00Z</project.build.outputTimestamp>
3838

39-
<maven.compiler.release>21</maven.compiler.release>
40-
<maven.compiler.source>21</maven.compiler.source>
41-
<maven.compiler.target>21</maven.compiler.target>
39+
<maven.compiler.release>25</maven.compiler.release>
40+
<maven.compiler.source>25</maven.compiler.source>
41+
<maven.compiler.target>25</maven.compiler.target>
4242
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
4343
<changelist>999999-SNAPSHOT</changelist>
4444
<gitHubRepo>jenkins-infra/plugin-modernizer-tool</gitHubRepo>

0 commit comments

Comments
 (0)