Skip to content

Commit bab4eb8

Browse files
committed
feat: bump LTS line and other related dependencies
1 parent 395d7b3 commit bab4eb8

File tree

8 files changed

+38
-33
lines changed

8 files changed

+38
-33
lines changed

Jenkinsfile

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ buildPlugin(
66
forkCount: '1C', // run this number of tests in parallel for faster feedback. If the number terminates with a 'C', the value will be multiplied by the number of available CPU cores
77
useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests
88
configurations: [
9+
[platform: 'linux', jdk: 17],
910
[platform: 'linux', jdk: 21],
1011
[platform: 'windows', jdk: 17],
11-
[platform: 'linux', jdk: 17],
12-
[platform: 'linux', jdk: 21]
1312
])

pom.xml

+6-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.jenkins-ci.plugins</groupId>
66
<artifactId>plugin</artifactId>
7-
<version>4.86</version>
7+
<version>5.4</version>
88
<relativePath />
99
</parent>
1010

@@ -52,20 +52,17 @@
5252
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
5353
<jira-rest-client.version>5.2.7</jira-rest-client.version>
5454
<fugue.version>4.7.2</fugue.version>
55-
<!-- TODO: Remove when 2.472 is available in LTS -->
56-
<jenkins.version>2.472</jenkins.version>
57-
<!-- TODO JENKINS-73339 until in parent POM -->
58-
<jenkins-test-harness.version>2254.vcff7a_d4969e5</jenkins-test-harness.version>
55+
<!-- jenkins -->
56+
<jenkins.version>2.479.3</jenkins.version>
5957
<spotless.check.skip>false</spotless.check.skip>
60-
<maven.compiler.release>17</maven.compiler.release>
6158
</properties>
6259

6360
<dependencyManagement>
6461
<dependencies>
6562
<dependency>
6663
<groupId>io.jenkins.tools.bom</groupId>
67-
<artifactId>bom-2.462.x</artifactId>
68-
<version>3258.vcdcf15936a_fd</version>
64+
<artifactId>bom-2.479.x</artifactId>
65+
<version>3875.v1df09947cde6</version>
6966
<type>pom</type>
7067
<scope>import</scope>
7168
</dependency>
@@ -77,7 +74,7 @@
7774
<dependency>
7875
<groupId>org.json</groupId>
7976
<artifactId>json</artifactId>
80-
<version>20240303</version>
77+
<version>20241224</version>
8178
</dependency>
8279
</dependencies>
8380
</dependencyManagement>

src/main/java/hudson/plugins/jira/CredentialsHelper.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
1313
import edu.umd.cs.findbugs.annotations.CheckForNull;
1414
import edu.umd.cs.findbugs.annotations.NonNull;
15+
import hudson.model.Descriptor.FormException;
1516
import hudson.model.Item;
1617
import hudson.model.Queue;
1718
import hudson.model.queue.Tasks;
@@ -53,7 +54,7 @@ protected static StandardUsernamePasswordCredentials lookupSystemCredentials(
5354
}
5455

5556
protected static StandardUsernamePasswordCredentials migrateCredentials(
56-
@NonNull String username, String password, @CheckForNull URL url) {
57+
@NonNull String username, String password, @CheckForNull URL url) throws FormException {
5758
List<StandardUsernamePasswordCredentials> credentials = CredentialsMatchers.filter(
5859
CredentialsProvider.lookupCredentials(
5960
StandardUsernamePasswordCredentials.class,

src/main/java/hudson/plugins/jira/JiraSite.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import hudson.Util;
3535
import hudson.model.AbstractDescribableImpl;
3636
import hudson.model.Descriptor;
37+
import hudson.model.Descriptor.FormException;
3738
import hudson.model.Item;
3839
import hudson.model.ItemGroup;
3940
import hudson.model.Job;
@@ -306,7 +307,8 @@ public JiraSite(
306307
boolean updateJiraIssueForAllStatus,
307308
@CheckForNull String groupVisibility,
308309
@CheckForNull String roleVisibility,
309-
boolean useHTTPAuth) {
310+
boolean useHTTPAuth)
311+
throws FormException {
310312
this(
311313
url,
312314
alternativeUrl,
@@ -332,7 +334,8 @@ public JiraSite(
332334
boolean updateJiraIssueForAllStatus,
333335
String groupVisibility,
334336
String roleVisibility,
335-
boolean useHTTPAuth) {
337+
boolean useHTTPAuth)
338+
throws FormException {
336339
this(
337340
url,
338341
alternativeUrl,
@@ -646,8 +649,9 @@ public void setUpdateJiraIssueForAllStatus(boolean updateJiraIssueForAllStatus)
646649
}
647650

648651
@SuppressWarnings("unused")
649-
protected Object readResolve() {
652+
protected Object readResolve() throws FormException {
650653
JiraSite jiraSite;
654+
651655
if (credentialsId == null && userName != null && password != null) { // Migrate credentials
652656
jiraSite = new JiraSite(
653657
url,

src/test/java/hudson/plugins/jira/CredentialsHelperTest.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.cloudbees.plugins.credentials.domains.DomainSpecification;
1414
import com.cloudbees.plugins.credentials.domains.HostnameSpecification;
1515
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
16+
import hudson.model.Descriptor.FormException;
1617
import java.io.IOException;
1718
import java.net.MalformedURLException;
1819
import java.net.URL;
@@ -29,7 +30,7 @@ public class CredentialsHelperTest {
2930
public JenkinsRule r = new JenkinsRule();
3031

3132
@Test
32-
public void lookupSystemCredentials() throws IOException {
33+
public void lookupSystemCredentials() throws IOException, FormException {
3334
assertNull(CredentialsHelper.lookupSystemCredentials("nonexistent-credentials-id", null));
3435

3536
StandardUsernamePasswordCredentials c =
@@ -41,7 +42,7 @@ public void lookupSystemCredentials() throws IOException {
4142
}
4243

4344
@Test
44-
public void lookupSystemCredentialsWithDomainRestriction() throws IOException {
45+
public void lookupSystemCredentialsWithDomainRestriction() throws IOException, FormException {
4546
Domain domain = new Domain(
4647
"example",
4748
"test domain",
@@ -56,7 +57,7 @@ public void lookupSystemCredentialsWithDomainRestriction() throws IOException {
5657
}
5758

5859
@Test
59-
public void migrateCredentials() throws MalformedURLException {
60+
public void migrateCredentials() throws MalformedURLException, FormException {
6061
assertThat(
6162
CredentialsProvider.lookupStores(r.jenkins).iterator().next().getCredentials(Domain.global()), empty());
6263

@@ -70,7 +71,7 @@ public void migrateCredentials() throws MalformedURLException {
7071
}
7172

7273
@Test
73-
public void migrateCredentialsWithExsitingCredentials() throws IOException {
74+
public void migrateCredentialsWithExsitingCredentials() throws IOException, FormException {
7475
Domain domain = new Domain(
7576
"example",
7677
"test domain",

src/test/java/hudson/plugins/jira/DescriptorImplTest.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
2222
import hudson.model.AbstractBuild;
2323
import hudson.model.AbstractProject;
24+
import hudson.model.Descriptor.FormException;
2425
import hudson.model.FreeStyleBuild;
2526
import hudson.model.FreeStyleProject;
2627
import hudson.model.Item;
@@ -60,7 +61,7 @@ public class DescriptorImplTest {
6061
JiraSite.Builder builder = spy(new JiraSite.Builder());
6162

6263
@Test
63-
public void doFillCredentialsIdItems() throws IOException {
64+
public void doFillCredentialsIdItems() throws IOException, FormException {
6465

6566
MockFolder dummy = r.createFolder("dummy");
6667
r.jenkins.setSecurityRealm(r.createDummySecurityRealm());

src/test/java/hudson/plugins/jira/JiraSiteSecurity1029Test.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,22 @@
1313
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
1414
import hudson.model.Item;
1515
import hudson.model.User;
16+
import jakarta.servlet.ServletException;
17+
import jakarta.servlet.http.HttpServletRequest;
18+
import jakarta.servlet.http.HttpServletResponse;
1619
import java.io.IOException;
1720
import java.net.URI;
1821
import java.net.URL;
1922
import java.nio.charset.StandardCharsets;
2023
import java.util.Arrays;
2124
import java.util.Base64;
2225
import java.util.HashMap;
23-
import javax.servlet.ServletException;
24-
import javax.servlet.http.HttpServletRequest;
25-
import javax.servlet.http.HttpServletResponse;
2626
import jenkins.model.Jenkins;
2727
import jenkins.security.ApiTokenProperty;
2828
import net.sf.json.JSONObject;
29-
import org.eclipse.jetty.ee8.servlet.DefaultServlet;
30-
import org.eclipse.jetty.ee8.servlet.ServletContextHandler;
31-
import org.eclipse.jetty.ee8.servlet.ServletHolder;
29+
import org.eclipse.jetty.ee9.servlet.DefaultServlet;
30+
import org.eclipse.jetty.ee9.servlet.ServletContextHandler;
31+
import org.eclipse.jetty.ee9.servlet.ServletHolder;
3232
import org.eclipse.jetty.server.Server;
3333
import org.eclipse.jetty.server.ServerConnector;
3434
import org.htmlunit.HttpMethod;

src/test/java/hudson/plugins/jira/JiraSiteTest.java

+9-7
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import com.cloudbees.plugins.credentials.domains.DomainSpecification;
2525
import com.cloudbees.plugins.credentials.domains.HostnameSpecification;
2626
import com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl;
27+
import hudson.model.Descriptor.FormException;
2728
import hudson.model.FreeStyleProject;
2829
import hudson.model.Job;
2930
import hudson.plugins.jira.model.JiraIssue;
@@ -62,7 +63,7 @@ public void init() throws MalformedURLException {
6263
}
6364

6465
@Test
65-
public void createSessionWithProvidedCredentials() {
66+
public void createSessionWithProvidedCredentials() throws FormException {
6667
JiraSite site = new JiraSite(
6768
validPrimaryUrl,
6869
null,
@@ -82,7 +83,7 @@ public void createSessionWithProvidedCredentials() {
8283

8384
@Test
8485
@Issue("JENKINS-64083")
85-
public void createSessionWithGlobalCredentials() {
86+
public void createSessionWithGlobalCredentials() throws FormException {
8687
JiraSite site = new JiraSite(
8788
validPrimaryUrl,
8889
null,
@@ -101,7 +102,7 @@ public void createSessionWithGlobalCredentials() {
101102
}
102103

103104
@Test
104-
public void createSessionReturnsNullIfCredentialsIsNull() {
105+
public void createSessionReturnsNullIfCredentialsIsNull() throws FormException {
105106
JiraSite site = new JiraSite(
106107
validPrimaryUrl,
107108
null,
@@ -120,7 +121,7 @@ public void createSessionReturnsNullIfCredentialsIsNull() {
120121
}
121122

122123
@Test
123-
public void deserializeMigrateCredentials() throws MalformedURLException {
124+
public void deserializeMigrateCredentials() throws MalformedURLException, FormException {
124125
JiraSiteOld old = new JiraSiteOld(
125126
validPrimaryUrl, null, ANY_USER, ANY_PASSWORD, false, false, null, false, null, null, true);
126127

@@ -153,7 +154,7 @@ public void deserializeMigrateCredentials() throws MalformedURLException {
153154
}
154155

155156
@Test
156-
public void deserializeNormal() throws IOException {
157+
public void deserializeNormal() throws IOException, FormException {
157158
Domain domain = new Domain(
158159
"example",
159160
"test domain",
@@ -207,7 +208,8 @@ private static class JiraSiteOld extends JiraSite {
207208
boolean updateJiraIssueForAllStatus,
208209
String groupVisibility,
209210
String roleVisibility,
210-
boolean useHTTPAuth) {
211+
boolean useHTTPAuth)
212+
throws FormException {
211213
super(
212214
url,
213215
alternativeUrl,
@@ -226,7 +228,7 @@ private static class JiraSiteOld extends JiraSite {
226228

227229
@Test
228230
@WithoutJenkins
229-
public void alternativeURLNotNull() {
231+
public void alternativeURLNotNull() throws FormException {
230232
JiraSite site = new JiraSite(
231233
validPrimaryUrl,
232234
exampleOrg,

0 commit comments

Comments
 (0)