Skip to content

Commit

Permalink
Test with Java 21 (#214)
Browse files Browse the repository at this point in the history
* Refresh plugin for June 2023

* Use parent pom 4.74

* Test with Java 21

Java 21 was released Sep 19, 2023. We want to announce full support for
Java 21 in 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 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.

---------

Co-authored-by: Basil Crow <me@basilcrow.com>
  • Loading branch information
MarkEWaite and basil committed Oct 19, 2023
1 parent 343d1c4 commit ff09734
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.4</version>
<version>1.6</version>
</extension>
</extensions>
5 changes: 4 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
buildPlugin()
buildPlugin(useContainerAgent: true, configurations: [
[platform: 'linux', jdk: 21],
[platform: 'windows', jdk: 17],
])
16 changes: 11 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.50</version>
<version>4.74</version>
<relativePath />
</parent>

Expand All @@ -18,7 +18,7 @@
<properties>
<revision>1.18</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.289.3</jenkins.version>
<jenkins.version>2.361.4</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
</properties>

Expand Down Expand Up @@ -58,7 +58,13 @@
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>code-coverage-api</artifactId>
<version>2.0.4</version>
<version>3.5.0</version>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.jenkins.plugins</groupId>
Expand Down Expand Up @@ -109,8 +115,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.289.x</artifactId>
<version>1500.ve4d05cd32975</version>
<artifactId>bom-2.361.x</artifactId>
<version>2102.v854b_fec19c92</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ public FilePath[] invoke(File f, VirtualChannel channel) throws IOException, Int
* Descriptor for {@link CoberturaPublisher}. Used as a singleton. The class is marked as public so that it can be
* accessed from views.
*
* See <tt>views/hudson/plugins/cobertura/CoberturaPublisher/*.jelly</tt> for the actual HTML fragment for the
* See {@code views/hudson/plugins/cobertura/CoberturaPublisher/*.jelly} for the actual HTML fragment for the
* configuration screen.
*/
@Extension
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/plugins/cobertura/Ratio.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.text.NumberFormat;

/**
* Represents <tt>x/y</tt> where x={@link #numerator} and y={@link #denominator}.
* Represents {@code x/y} where x={@link #numerator} and y={@link #denominator}.
*
* @author Kohsuke Kawaguchi
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/**
* Different ways of aggregating data series {x_1,x_2,x_3,...}, which can be represented as
* <tt>f(...f(f(ZERO,x_1),x_2)...,x_n)</tt>
* {@code f(...f(f(ZERO,x_1),x_2)...,x_n)}
*
* @author Stephen Connolly
* @since 22-Aug-2007 18:07:35
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.jvnet.hudson.test.JenkinsRule.WebClient;

import com.cloudbees.hudson.plugins.folder.Folder;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.htmlunit.html.HtmlPage;

public class CoverageTablePortletTest {

Expand Down

0 comments on commit ff09734

Please sign in to comment.