diff --git a/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepMavenExecResolutionTest.java b/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepMavenExecResolutionTest.java index 153e72f09..4f71c3264 100644 --- a/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepMavenExecResolutionTest.java +++ b/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepMavenExecResolutionTest.java @@ -189,7 +189,7 @@ private void registerAgentForContainer(GenericContainer slaveContainer) throw registerAgentForSlaveContainer(slaveContainer); } - private void addTestSshCredentials() { + private void addTestSshCredentials() throws Exception { Credentials credentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, SSH_CREDENTIALS_ID, null, "test", "test"); diff --git a/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepTest.java b/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepTest.java index 7552acb77..c0b93dcd2 100644 --- a/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepTest.java +++ b/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/WithMavenStepTest.java @@ -242,7 +242,7 @@ private void registerAgentForContainer(GenericContainer container) throws Exc registerAgentForSlaveContainer(container); } - private void addTestSshCredentials() { + private void addTestSshCredentials() throws Exception { Credentials credentials = new UsernamePasswordCredentialsImpl(CredentialsScope.GLOBAL, SSH_CREDENTIALS_ID, null, "test", "test"); diff --git a/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/FakeCredentialsProvider.java b/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/FakeCredentialsProvider.java index c71faf4c9..1579642d5 100644 --- a/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/FakeCredentialsProvider.java +++ b/pipeline-maven/src/test/java/org/jenkinsci/plugins/pipeline/maven/util/FakeCredentialsProvider.java @@ -36,9 +36,14 @@ public List getCredentials( ItemGroup itemGroup, Authentication authentication, List domainRequirements) { - UsernamePasswordCredentialsImpl creds = new UsernamePasswordCredentialsImpl(GLOBAL, id, "", username, password); - creds.setUsernameSecret(usernameIsSecret); - return (List) asList(creds); + UsernamePasswordCredentialsImpl creds; + try { + creds = new UsernamePasswordCredentialsImpl(GLOBAL, id, "", username, password); + creds.setUsernameSecret(usernameIsSecret); + return (List) asList(creds); + } catch (FormException e) { + throw new IllegalStateException("Cannot create fake credentials", e); + } } @Override diff --git a/pom.xml b/pom.xml index f91342a0e..7d211a5ce 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ org.jenkins-ci.plugins plugin - 4.88 + 5.3 @@ -100,8 +100,8 @@ 8.4.0-31.va_b_5ce7933762 42.7.2-40.v76d376d65c77 4.53 - 3258.vcdcf15936a_fd - 2.440.3 + 3696.vb_b_4e2d1a_0542 + 2.479.1 5.11.3 3.5.0 0.3.5 @@ -120,7 +120,7 @@ io.jenkins.tools.bom - bom-2.440.x + bom-2.479.x ${jenkins-tools-bom.version} pom import