Skip to content

Commit e659546

Browse files
authored
Test with Java 21 (#124)
* Use parent pom 4.74 * Use bom-2.387.x latest release * Test with Java 21 Java 21 was released Sep 19, 2023. We want to announce full support for Java 21 in early October and would like the most used plugins to be compiled and tested with Java 21. The acceptance test harness and plugin bill of materials tests are already passing with Java 21. This is a further step to improve plugin readiness for use with Java 21 and for development with Java 21. The change intentionally tests only two Java configurations, Java 17 and Java 21 because we believe that the risk of a regression that only affects Java 11 is low. We generate Java 11 byte code with the Java 17 and the Java 21 builds, so we're already testing Java 11 byte code. * Test in parallel on ci.jenkins.io Allow ci.jenkins.io to run the tests with one process per available core, while developers are allowed to configure the amount of parallel testing based on the configuration and use of their computer. Developers can adjust parallel execution by passing a command line argument to Maven like this: mvn clean -DforkCount=1C verify Developers can define a Maven profile that sets the forkCount in their ~/.m2/settings.xml like this: <profile> <id>faster</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <forkCount>.45C</forkCount> </properties> </profile> With that entry in the settings.xml file, then 0.45C will be used for: mvn clean verify Tests pass with `-DforkCount=1C` on my Linux computer with Java 21.
1 parent 1e9c5d8 commit e659546

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/* For https://ci.jenkins.io/ */
44
/* The `buildPlugin` step has been provided by: https://github.com/jenkins-infra/pipeline-library */
5-
buildPlugin(useContainerAgent: true, configurations: [
6-
[platform: 'linux', jdk: 17],
7-
[platform: 'windows', jdk: 11],
5+
buildPlugin(useContainerAgent: true, forkCount: '1C', configurations: [
6+
[platform: 'linux', jdk: 21],
7+
[platform: 'windows', jdk: 17],
88
])

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<groupId>org.jenkins-ci.plugins</groupId>
77
<artifactId>plugin</artifactId>
8-
<version>4.66</version>
8+
<version>4.74</version>
99
<relativePath />
1010
</parent>
1111

@@ -61,8 +61,8 @@
6161
<dependencies>
6262
<dependency>
6363
<groupId>io.jenkins.tools.bom</groupId>
64-
<artifactId>bom-2.375.x</artifactId>
65-
<version>1968.vb_14a_29e76128</version>
64+
<artifactId>bom-2.387.x</artifactId>
65+
<version>2496.vddfca_753db_80</version>
6666
<type>pom</type>
6767
<scope>import</scope>
6868
</dependency>

0 commit comments

Comments
 (0)