Skip to content

Commit c372608

Browse files
MarkEWaitegit-client-user
and
git-client-user
authored
Require Jenkins 2.479 or newer (#1172)
* Test JGit 7.0.0-m2 pre-release with Java 17 build JGit 7.0.0 requires Java 17. Jenkins 2.463 requires Java 17. Use the plugin bill of materials from 2.462.x because it is the closest we have to 2.463. The plugin is expected to work with any release 2.463 or later. * Test JGit 7.0.0 with Jakarta EE 9 Jenkins core * Use JGit 7.0.0.202408202050-m3 pre-release * Use JGit 7.0.0.202409031743-r * Adapt to removed API's in JGit 7.0.0 * Use test harness 2265.x * Next Jenkins baseline will be a .1 * Use JGit 7.0.0 with Java 17 JGit 7.0.0 requires Java 17. Jenkins 2.463 requires Java 17. Use the plugin bill of materials from 2.462.x because it is the closest we have to 2.463. The plugin is expected to work with any release 2.463 or later. Adapt to removed API's in JGit 7.0.0 by replacing calls to removed API's with the recommended equivalents. Tested in my development environment and no issues detected. Tests run from a container based Jenkins controller with Windows, Linux, and FreeBSD agents. Tests ran on multiple weekly releases of Jenkins since 2.463. The Linux agents include: * Alpine * Debian Linux 11, 12, testing, and unstable * openSUSE * Red Hat Enterprise Linux 8 * Rocky Linux 9 * Ubuntu 20.04, 22.04, and 24.04 * Use 6.1.0 as version * Use Java 17 features in source code https://docs.openrewrite.org/running-recipes/popular-recipe-guides/migrate-to-java-17 provided the transformations and they all pass automated tests. Several nice readability improvements are provided by Java 17. * Require Jenkins 2.477 * Use test harness that drops EE 8 * Use Jenkins test harness 2289.x * Use test harness 2299.* * Use parent pom 5.0 Removes a few of the workarounds since it is released. * Security scan not ready for Java 17 and Jakarta EE 9 * Use parent pom 5.1 https://github.com/jenkinsci/plugin-pom/releases/tag/plugin-5.1 notes that it includes a workaround the outdated ASM API inclusion that Guice brings into Jenkins core. Has not affected the git client plugin, but it is good to remain current with the most recent release of the parent pom. * Revert "Security scan not ready for Java 17 and Jakarta EE 9" Cheeck if security scan is ready for Java 17 and Jakarta EE 9 This reverts commit 4bcca7e. * Use StaplerRequest2 for EE 9 No need to rely on the compatibility layer for EE 8 --------- Co-authored-by: git-client-user <git-client-user@example.com>
1 parent c277084 commit c372608

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

pom.xml

+3-5
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.88</version>
8+
<version>5.1</version>
99
<relativePath />
1010
</parent>
1111

@@ -53,7 +53,7 @@
5353
</scm>
5454

5555
<properties>
56-
<revision>6.0.1</revision>
56+
<revision>6.1.0</revision>
5757
<changelist>-SNAPSHOT</changelist>
5858
<!-- Character set tests fail unless file.encoding is set -->
5959
<argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
@@ -62,10 +62,8 @@
6262
<jenkins.baseline>2.462</jenkins.baseline>
6363
<!-- TODO Replace with the standard jenkins.baseline references after LTS requires Java 17 -->
6464
<!-- <jenkins.version>${jenkins.baseline}.1</jenkins.version> -->
65-
<jenkins.version>2.463</jenkins.version>
65+
<jenkins.version>2.479</jenkins.version>
6666
<jgit.version>7.0.0.202409031743-r</jgit.version>
67-
<!-- TODO JENKINS-73339 until in parent POM -->
68-
<maven.compiler.release>17</maven.compiler.release>
6967
<spotbugs.effort>Max</spotbugs.effort>
7068
<spotbugs.threshold>Low</spotbugs.threshold>
7169
<spotless.check.skip>false</spotless.check.skip>

src/main/java/hudson/plugins/git/GitTool.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import org.jenkinsci.Symbol;
2828
import org.kohsuke.stapler.DataBoundConstructor;
2929
import org.kohsuke.stapler.QueryParameter;
30-
import org.kohsuke.stapler.StaplerRequest;
30+
import org.kohsuke.stapler.StaplerRequest2;
3131
import org.kohsuke.stapler.interceptor.RequirePOST;
3232

3333
/**
@@ -153,7 +153,7 @@ public String getDisplayName() {
153153
}
154154

155155
@Override
156-
public boolean configure(StaplerRequest req, JSONObject json) {
156+
public boolean configure(StaplerRequest2 req, JSONObject json) {
157157
setInstallations(req.bindJSONToList(clazz, json.get("tool")).toArray(new GitTool[0]));
158158
save();
159159
return true;

0 commit comments

Comments
 (0)