Skip to content

Commit

Permalink
Update plugin and test with java 21 (#336)
Browse files Browse the repository at this point in the history
* Modernize plugin

* Upgrade HtmlUnit from 2.x to 3.x

* Use most recent bom-2.387.x release

* Use lombok compatible with Java 21

* Remove trailing space

* 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.

---------

Co-authored-by: Basil Crow <me@basilcrow.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
  • Loading branch information
3 people committed Oct 17, 2023
1 parent a38b793 commit bcae54a
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 64 deletions.
7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.6</version>
</extension>
</extensions>
2 changes: 2 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
4 changes: 4 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
buildPlugin(useContainerAgent: true, configurations: [
[platform: 'linux', jdk: 21],
[platform: 'windows', jdk: 17],
])
99 changes: 36 additions & 63 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,25 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.50</version>
<version>4.74</version>
<relativePath />
</parent>

<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-jenkins-plugin</artifactId>
<version>2.31.0.11-SNAPSHOT</version>
<version>${revision}${changelist}</version>
<packaging>hpi</packaging>

<name>Allure Jenkins Plugin</name>
<url>https://github.com/jenkinsci/allure-plugin</url>

<properties>
<spotless.version>2.35.0</spotless.version>
<revision>2.31.0.11</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/allure-plugin</gitHubRepo>
<jenkins.version>2.387.3</jenkins.version>
<allureCommandline.version>2.21.0</allureCommandline.version>
<jenkins.version>2.387.1</jenkins.version>
<truezip.version>7.7.10</truezip.version>
<java.level>8</java.level>
<sourceVersion>1.8</sourceVersion>
<targetVersion>1.8</targetVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<developers>
Expand Down Expand Up @@ -64,16 +62,16 @@
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>

<scm>
<connection>scm:git:https://github.com/jenkinsci/allure-plugin.git</connection>
<developerConnection>scm:git:ssh://git@github.com/jenkinsci/allure-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/allure-plugin</url>
<tag>HEAD</tag>
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection>
<url>https://github.com/${gitHubRepo}</url>
<tag>${scmTag}</tag>
</scm>

<issueManagement>
Expand All @@ -86,7 +84,7 @@
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<!-- optional: limit format enforcement to just the files changed by this feature branch -->
Expand Down Expand Up @@ -213,7 +211,7 @@
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.7.3.3</version>
<version>${spotbugs-maven-plugin.version}</version>
<configuration>
<excludeFilterFile>.mvn/quality-configs/spotbugs/exclude.xml</excludeFilterFile>
<failOnError>false</failOnError>
Expand Down Expand Up @@ -260,7 +258,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<version>${maven-surefire-plugin.version}</version>
<executions>
<execution>
<goals>
Expand All @@ -283,7 +281,7 @@
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.387.x</artifactId>
<version>1968.vb_14a_29e76128</version>
<version>2496.vddfca_753db_80</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -294,62 +292,57 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.26</version>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>de.schlichtherle.truezip</groupId>
<artifactId>truezip-driver-zip</artifactId>
<version>${truezip.version}</version>
<exclusions>
<!-- Provided by Jenkins core -->
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
<!-- Provided by bouncycastle-api plugin -->
<exclusion>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>de.schlichtherle.truezip</groupId>
<artifactId>truezip-file</artifactId>
<version>${truezip.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>symbol-annotation</artifactId>
<version>1.10</version>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>bouncycastle-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.23.0</version>
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>instance-identity</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1229.v4880b_b_e905a_6</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>matrix-project</artifactId>
<version>785.v06b_7f47b_c631</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>639.v6eca_cd8c04a_a_</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>job-dsl-core</artifactId>
<version>1.83</version>
<optional>true</optional>
</dependency>
<dependency>
Expand All @@ -361,7 +354,6 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>324.va_f5d6774f3a_d</version>
<optional>true</optional>
</dependency>

Expand All @@ -370,7 +362,6 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -394,55 +385,37 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>cloudbees-folder</artifactId>
<version>6.815.v0dd5a_cb_40e0e</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1189.v1b_e593637fa_e</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-cps</artifactId>
<version>3653.v07ea_433c90b_4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-job</artifactId>
<version>2.15</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-durable-task-step</artifactId>
<version>2.17</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-basic-steps</artifactId>
<version>2.6</version>
<scope>test</scope>
</dependency>
</dependencies>

<profiles>
<profile>
<id>doclint-java8-disable</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<additionalparam>-Xdoclint:none</additionalparam>
</properties>
</profile>
</profiles>

<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
package ru.yandex.qatools.allure.jenkins;

import com.gargoylesoftware.htmlunit.html.HtmlPage;
import org.htmlunit.html.HtmlPage;
import hudson.matrix.Axis;
import hudson.matrix.MatrixBuild;
import hudson.matrix.MatrixProject;
Expand Down

0 comments on commit bcae54a

Please sign in to comment.