Skip to content

Commit 619cb15

Browse files
authored
Merge pull request #318 from basil/jakarta
Require Java 17 or newer; migrate to EE 9
2 parents d8886e0 + a2c173b commit 619cb15

File tree

7 files changed

+13
-16
lines changed

7 files changed

+13
-16
lines changed

pom.xml

Lines changed: 4 additions & 4 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.88</version>
8+
<version>5.1</version>
99
<relativePath/>
1010
</parent>
1111

@@ -17,7 +17,7 @@
1717
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
1818
<properties>
1919
<changelist>999999-SNAPSHOT</changelist>
20-
<jenkins.version>2.414.3</jenkins.version>
20+
<jenkins.version>2.479</jenkins.version>
2121
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
2222
</properties>
2323
<licenses>
@@ -51,8 +51,8 @@
5151
<dependencies>
5252
<dependency>
5353
<groupId>io.jenkins.tools.bom</groupId>
54-
<artifactId>bom-2.414.x</artifactId>
55-
<version>2982.vdce2153031a_0</version>
54+
<artifactId>bom-2.462.x</artifactId>
55+
<version>3435.v238d66a_043fb_</version>
5656
<scope>import</scope>
5757
<type>pom</type>
5858
</dependency>

src/main/java/org/jenkinsci/plugins/credentialsbinding/impl/ZipFileBinding.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import org.kohsuke.stapler.AncestorInPath;
4545
import org.kohsuke.stapler.DataBoundConstructor;
4646
import org.kohsuke.stapler.QueryParameter;
47-
import org.kohsuke.stapler.StaplerRequest;
47+
import org.kohsuke.stapler.StaplerRequest2;
4848

4949
public class ZipFileBinding extends AbstractOnDiskBinding<FileCredentials> {
5050

@@ -77,7 +77,7 @@ public String getDisplayName() {
7777
}
7878

7979
// @RequirePOST
80-
public FormValidation doCheckCredentialsId(StaplerRequest req, @AncestorInPath Item owner, @QueryParameter String value) {
80+
public FormValidation doCheckCredentialsId(StaplerRequest2 req, @AncestorInPath Item owner, @QueryParameter String value) {
8181
//TODO due to weird behavior in c:select, there are initial calls using GET
8282
// so using this approach will prevent 405 errors
8383
if (!req.getMethod().equals("POST")) {

src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/BuildWrapperOrderCredentialsBindingTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
import org.jvnet.hudson.test.Issue;
4949
import org.jvnet.hudson.test.JenkinsRule;
5050
import org.jvnet.hudson.test.TestExtension;
51-
import org.kohsuke.stapler.StaplerRequest;
51+
import org.kohsuke.stapler.StaplerRequest2;
5252

5353
import java.io.IOException;
5454
import java.util.Collections;
@@ -114,7 +114,7 @@ public boolean isApplicable(AbstractProject<?, ?> item) {
114114
}
115115

116116
@Override
117-
public BuildWrapper newInstance(StaplerRequest req, @NonNull JSONObject formData) {
117+
public BuildWrapper newInstance(StaplerRequest2 req, @NonNull JSONObject formData) {
118118
return new BuildWrapperOrder();
119119
}
120120

src/test/java/org/jenkinsci/plugins/credentialsbinding/masking/AlmquistShellSecretPatternFactoryTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import org.junit.runner.RunWith;
4141
import org.jvnet.hudson.test.JenkinsRule;
4242

43-
import java.io.IOException;
4443
import java.util.ArrayList;
4544
import java.util.List;
4645
import java.util.Random;
@@ -104,7 +103,7 @@ public static void assumeAsh() {
104103
}
105104

106105
@Before
107-
public void setUp() throws IOException {
106+
public void setUp() throws Exception {
108107
j.jenkins.getDescriptorByType(Shell.DescriptorImpl.class).setShell(Executables.getPathToExecutable("ash"));
109108
project = j.createProject(WorkflowJob.class);
110109
credentialsId = UUID.randomUUID().toString();

src/test/java/org/jenkinsci/plugins/credentialsbinding/masking/BashSecretPatternFactoryTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import org.junit.runner.RunWith;
4141
import org.jvnet.hudson.test.JenkinsRule;
4242

43-
import java.io.IOException;
4443
import java.util.ArrayList;
4544
import java.util.List;
4645
import java.util.Random;
@@ -91,7 +90,7 @@ public static void assumeBash() {
9190
}
9291

9392
@Before
94-
public void setUp() throws IOException {
93+
public void setUp() throws Exception {
9594
j.jenkins.getDescriptorByType(Shell.DescriptorImpl.class).setShell(Executables.getPathToExecutable("bash"));
9695
project = j.createProject(WorkflowJob.class);
9796
credentialsId = UUID.randomUUID().toString();

src/test/java/org/jenkinsci/plugins/credentialsbinding/masking/BourneShellSecretPatternFactoryTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.junit.runner.RunWith;
3939
import org.jvnet.hudson.test.JenkinsRule;
4040

41-
import java.io.IOException;
4241
import java.util.ArrayList;
4342
import java.util.List;
4443
import java.util.Random;
@@ -86,7 +85,7 @@ public static void assumeBash() {
8685
}
8786

8887
@Before
89-
public void setUp() throws IOException {
88+
public void setUp() throws Exception {
9089
project = j.createProject(WorkflowJob.class);
9190
credentialsId = UUID.randomUUID().toString();
9291
project.setDefinition(new CpsFlowDefinition(

src/test/java/org/jenkinsci/plugins/credentialsbinding/test/CredentialsTestUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static void setStringCredentials(ModelObject context, String credentialsI
6262
* Registers the given value as a {@link UsernamePasswordCredentials} into the default {@link CredentialsProvider}.
6363
* Returns the generated credential id for the registered credentials.
6464
*/
65-
public static String registerUsernamePasswordCredentials(ModelObject context, String username, String password) throws IOException {
65+
public static String registerUsernamePasswordCredentials(ModelObject context, String username, String password) throws Exception {
6666
String credentialsId = UUID.randomUUID().toString();
6767
setUsernamePasswordCredentials(context, credentialsId, username, password);
6868
return credentialsId;
@@ -72,7 +72,7 @@ public static String registerUsernamePasswordCredentials(ModelObject context, St
7272
* Registers the given value as a {@link UsernamePasswordCredentials} into the default {@link CredentialsProvider} using the
7373
* specified credentials id.
7474
*/
75-
public static void setUsernamePasswordCredentials(ModelObject context, String credentialsId, String username, String password) throws IOException {
75+
public static void setUsernamePasswordCredentials(ModelObject context, String credentialsId, String username, String password) throws Exception {
7676
UsernamePasswordCredentials creds = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, credentialsId, null, username, password);
7777
CredentialsProvider.lookupStores(context).iterator().next().addCredentials(Domain.global(), creds);
7878
}

0 commit comments

Comments
 (0)