From c33920c49ba8115ad83fbe80bc129cef74e8c1ac Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 08:24:30 +0000 Subject: [PATCH] Update dependency io.jenkins.tools.bom:bom-2.440.x to v3435 (#858) * Update dependency io.jenkins.tools.bom:bom-2.440.x to v3435 * fix compile errors --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Benoit GUERIN --- .../maven/WithMavenStepMavenExecResolutionTest.java | 2 +- .../plugins/pipeline/maven/WithMavenStepTest.java | 2 +- .../pipeline/maven/util/FakeCredentialsProvider.java | 11 ++++++++--- pom.xml | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) 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 153e72f0..4f71c326 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 7552acb7..c0b93dcd 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 c71faf4c..1579642d 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 a2f0e72a..77ba43c2 100644 --- a/pom.xml +++ b/pom.xml @@ -100,7 +100,7 @@ 8.4.0-31.va_b_5ce7933762 42.7.2-40.v76d376d65c77 4.53 - 3258.vcdcf15936a_fd + 3435.v238d66a_043fb_ 2.440.3 5.11.3 3.5.1