From 32f1facdeec0b4e5bbfad3aeba3a88ac232b81ec Mon Sep 17 00:00:00 2001 From: Jesse Glick Date: Thu, 6 Jan 2022 12:10:14 -0500 Subject: [PATCH 01/11] Do not use `javax.mail` for `doCheckAdminAddress` --- .../jenkins/model/JenkinsLocationConfiguration.java | 10 ++++------ .../main/resources/jenkins/model/Messages.properties | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java b/core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java index 12aa35b0e5f6..5aa73c17528a 100644 --- a/core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java +++ b/core/src/main/java/jenkins/model/JenkinsLocationConfiguration.java @@ -18,8 +18,6 @@ import java.lang.reflect.Method; import java.util.logging.Level; import java.util.logging.Logger; -import javax.mail.internet.AddressException; -import javax.mail.internet.InternetAddress; import javax.servlet.ServletContext; import jenkins.util.SystemProperties; import jenkins.util.UrlHelper; @@ -210,11 +208,11 @@ public FormValidation doCheckUrl(@QueryParameter String value) { } public FormValidation doCheckAdminAddress(@QueryParameter String value) { - try { - new InternetAddress(value); + // TODO if equal to Messages.Mailer_Address_Not_Configured(), suggest configuring it with FormValidation.warning? + if (Util.fixNull(value).contains("@")) { return FormValidation.ok(); - } catch (AddressException e) { - return FormValidation.error(e.getMessage()); + } else { + return FormValidation.error(Messages.JenkinsLocationConfiguration_does_not_look_like_an_email_address()); } } diff --git a/core/src/main/resources/jenkins/model/Messages.properties b/core/src/main/resources/jenkins/model/Messages.properties index d5afb130acf6..ef2028aa5fd5 100644 --- a/core/src/main/resources/jenkins/model/Messages.properties +++ b/core/src/main/resources/jenkins/model/Messages.properties @@ -57,6 +57,7 @@ IdStrategy.CaseSensitive.DisplayName=Case sensitive IdStrategy.CaseSensitiveEmailAddress.DisplayName=Case sensitive (email address) Mailer.Address.Not.Configured=address not configured yet +JenkinsLocationConfiguration.does_not_look_like_an_email_address=Does not look like an email address Mailer.Localhost.Error=Please set a valid host name, instead of localhost Mailer.NotHttp.Error=The URL is invalid, please ensure you are using http:// or https:// with a valid domain. From 15b1fdde45ae794596bb6dcf7ae13040d4636165 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Thu, 6 Jan 2022 06:05:35 -0800 Subject: [PATCH 02/11] Detach JavaMail --- bom/pom.xml | 5 ----- core/pom.xml | 4 ---- .../main/resources/jenkins/split-plugin-cycles.txt | 2 ++ core/src/main/resources/jenkins/split-plugins.txt | 3 +++ test/pom.xml | 6 ++++++ war/pom.xml | 12 ++++++++++++ 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/bom/pom.xml b/bom/pom.xml index 3fc576fae329..bc95cdf69a12 100644 --- a/bom/pom.xml +++ b/bom/pom.xml @@ -319,11 +319,6 @@ THE SOFTWARE. symbol-annotation 1.1 - - com.sun.mail - jakarta.mail - 1.6.5 - diff --git a/core/pom.xml b/core/pom.xml index 0b10a40a0d22..28fbaaaf812b 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -280,10 +280,6 @@ THE SOFTWARE. org.apache.commons commons-compress - - com.sun.mail - jakarta.mail - jaxen jaxen diff --git a/core/src/main/resources/jenkins/split-plugin-cycles.txt b/core/src/main/resources/jenkins/split-plugin-cycles.txt index 3cec061d7eb0..17f997f98970 100644 --- a/core/src/main/resources/jenkins/split-plugin-cycles.txt +++ b/core/src/main/resources/jenkins/split-plugin-cycles.txt @@ -32,3 +32,5 @@ junit jaxb bouncycastle-api jaxb command-launcher jaxb jdk-tool jaxb + +javax-activation-api javax-mail-api diff --git a/core/src/main/resources/jenkins/split-plugins.txt b/core/src/main/resources/jenkins/split-plugins.txt index 0bb03189d9c8..eeab9467a13b 100644 --- a/core/src/main/resources/jenkins/split-plugins.txt +++ b/core/src/main/resources/jenkins/split-plugins.txt @@ -34,3 +34,6 @@ trilead-api 2.184 1.0.4 # JENKINS-64107 sshd 2.281 3.0.1 + +javax-activation-api 2.328 1.2.0-1 +javax-mail-api 2.328 1.6.2-1 diff --git a/test/pom.xml b/test/pom.xml index 336a6e6322ed..e3304968c32c 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -121,6 +121,12 @@ THE SOFTWARE. 391.ve4a_38c1b_cf4b_ test + + io.jenkins.plugins + javax-mail-api + 1.6.2-1 + test + org.jenkins-ci.plugins matrix-auth diff --git a/war/pom.xml b/war/pom.xml index e71473d30ca0..a9c806ca30e0 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -367,6 +367,18 @@ THE SOFTWARE. 1.0.4 hpi + + io.jenkins.plugins + javax-activation-api + 1.2.0-1 + hpi + + + io.jenkins.plugins + javax-mail-api + 1.6.2-1 + hpi + ${project.build.directory}/${project.build.finalName}/WEB-INF/detached-plugins true From 72bc9034c0b9bfc88432044b454c1985a501c60a Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Fri, 7 Jan 2022 13:10:09 -0800 Subject: [PATCH 03/11] Revert "Bump `git-changelist-maven-extension` from 1.2 to 1.3 (#6132)" This reverts commit 3cc387a5b604994293ad06d8209ee119862f1bff. --- .mvn/extensions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index a65d82e1b647..43d62816190d 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -2,6 +2,6 @@ io.jenkins.tools.incrementals git-changelist-maven-extension - 1.3 + 1.2 From 21e2f37818b5d2f5f5c2926f4c28dd58e75deb94 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Fri, 7 Jan 2022 19:00:22 -0800 Subject: [PATCH 04/11] Revert "Revert "Bump `git-changelist-maven-extension` from 1.2 to 1.3 (#6132)"" This reverts commit 72bc9034c0b9bfc88432044b454c1985a501c60a. --- .mvn/extensions.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml index 43d62816190d..a65d82e1b647 100644 --- a/.mvn/extensions.xml +++ b/.mvn/extensions.xml @@ -2,6 +2,6 @@ io.jenkins.tools.incrementals git-changelist-maven-extension - 1.2 + 1.3 From b87684ec3f62234542ffcb1dd04ac0e703cfa96a Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Fri, 7 Jan 2022 19:35:27 -0800 Subject: [PATCH 05/11] Bump releases --- core/src/main/resources/jenkins/split-plugins.txt | 4 ++-- test/pom.xml | 2 +- war/pom.xml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/src/main/resources/jenkins/split-plugins.txt b/core/src/main/resources/jenkins/split-plugins.txt index eeab9467a13b..931663f2450d 100644 --- a/core/src/main/resources/jenkins/split-plugins.txt +++ b/core/src/main/resources/jenkins/split-plugins.txt @@ -35,5 +35,5 @@ trilead-api 2.184 1.0.4 # JENKINS-64107 sshd 2.281 3.0.1 -javax-activation-api 2.328 1.2.0-1 -javax-mail-api 2.328 1.6.2-1 +javax-activation-api 2.328 1.2.0-2 +javax-mail-api 2.328 1.6.2-2 diff --git a/test/pom.xml b/test/pom.xml index e3304968c32c..ea00b0750316 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -124,7 +124,7 @@ THE SOFTWARE. io.jenkins.plugins javax-mail-api - 1.6.2-1 + 1.6.2-2 test diff --git a/war/pom.xml b/war/pom.xml index a9c806ca30e0..4f3ff4969b9d 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -370,13 +370,13 @@ THE SOFTWARE. io.jenkins.plugins javax-activation-api - 1.2.0-1 + 1.2.0-2 hpi io.jenkins.plugins javax-mail-api - 1.6.2-1 + 1.6.2-2 hpi From 64aeabbc29456d9e52a9600ed0146ebd3c3224c2 Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Fri, 7 Jan 2022 20:23:53 -0800 Subject: [PATCH 06/11] Fix split plugin cycles --- core/src/main/resources/jenkins/split-plugin-cycles.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/resources/jenkins/split-plugin-cycles.txt b/core/src/main/resources/jenkins/split-plugin-cycles.txt index 17f997f98970..848ede384feb 100644 --- a/core/src/main/resources/jenkins/split-plugin-cycles.txt +++ b/core/src/main/resources/jenkins/split-plugin-cycles.txt @@ -34,3 +34,5 @@ command-launcher jaxb jdk-tool jaxb javax-activation-api javax-mail-api +javax-activation-api sshd +javax-mail-api sshd From e6cb3600aaf97b67725799ab2e4487a7c1ec054c Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Sat, 8 Jan 2022 12:30:45 -0800 Subject: [PATCH 07/11] Bump releases --- core/src/main/resources/jenkins/split-plugins.txt | 2 +- test/pom.xml | 2 +- war/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/resources/jenkins/split-plugins.txt b/core/src/main/resources/jenkins/split-plugins.txt index 931663f2450d..5ccc149418f3 100644 --- a/core/src/main/resources/jenkins/split-plugins.txt +++ b/core/src/main/resources/jenkins/split-plugins.txt @@ -36,4 +36,4 @@ trilead-api 2.184 1.0.4 sshd 2.281 3.0.1 javax-activation-api 2.328 1.2.0-2 -javax-mail-api 2.328 1.6.2-2 +javax-mail-api 2.328 1.6.2-3 diff --git a/test/pom.xml b/test/pom.xml index a1a92dcfe6a5..ee7e8d7a6785 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -124,7 +124,7 @@ THE SOFTWARE. io.jenkins.plugins javax-mail-api - 1.6.2-2 + 1.6.2-3 test diff --git a/war/pom.xml b/war/pom.xml index 4f3ff4969b9d..2cfb5ddade66 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -376,7 +376,7 @@ THE SOFTWARE. io.jenkins.plugins javax-mail-api - 1.6.2-2 + 1.6.2-3 hpi From aa974a6f25bfdfaf7210e105ee111bd994d8c4ca Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Sat, 8 Jan 2022 13:49:54 -0800 Subject: [PATCH 08/11] Bump versions --- core/src/main/resources/jenkins/split-plugins.txt | 2 +- test/pom.xml | 2 +- war/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/resources/jenkins/split-plugins.txt b/core/src/main/resources/jenkins/split-plugins.txt index 5ccc149418f3..606fcbe16c4b 100644 --- a/core/src/main/resources/jenkins/split-plugins.txt +++ b/core/src/main/resources/jenkins/split-plugins.txt @@ -36,4 +36,4 @@ trilead-api 2.184 1.0.4 sshd 2.281 3.0.1 javax-activation-api 2.328 1.2.0-2 -javax-mail-api 2.328 1.6.2-3 +javax-mail-api 2.328 1.6.2-4 diff --git a/test/pom.xml b/test/pom.xml index ee7e8d7a6785..d9df47941158 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -124,7 +124,7 @@ THE SOFTWARE. io.jenkins.plugins javax-mail-api - 1.6.2-3 + 1.6.2-4 test diff --git a/war/pom.xml b/war/pom.xml index 2cfb5ddade66..35da381f437f 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -376,7 +376,7 @@ THE SOFTWARE. io.jenkins.plugins javax-mail-api - 1.6.2-3 + 1.6.2-4 hpi From faf50aad3e46edae77812337ac279a2b8d24a32d Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Sat, 8 Jan 2022 22:11:17 -0800 Subject: [PATCH 09/11] Bump versions --- core/src/main/resources/jenkins/split-plugins.txt | 2 +- test/pom.xml | 2 +- war/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/resources/jenkins/split-plugins.txt b/core/src/main/resources/jenkins/split-plugins.txt index 606fcbe16c4b..73259d3b1c67 100644 --- a/core/src/main/resources/jenkins/split-plugins.txt +++ b/core/src/main/resources/jenkins/split-plugins.txt @@ -36,4 +36,4 @@ trilead-api 2.184 1.0.4 sshd 2.281 3.0.1 javax-activation-api 2.328 1.2.0-2 -javax-mail-api 2.328 1.6.2-4 +javax-mail-api 2.328 1.6.2-5 diff --git a/test/pom.xml b/test/pom.xml index d9df47941158..a7f2c892e671 100644 --- a/test/pom.xml +++ b/test/pom.xml @@ -124,7 +124,7 @@ THE SOFTWARE. io.jenkins.plugins javax-mail-api - 1.6.2-4 + 1.6.2-5 test diff --git a/war/pom.xml b/war/pom.xml index 35da381f437f..e0c5d5f6e171 100644 --- a/war/pom.xml +++ b/war/pom.xml @@ -376,7 +376,7 @@ THE SOFTWARE. io.jenkins.plugins javax-mail-api - 1.6.2-4 + 1.6.2-5 hpi From 8f99ae46acaf5253d6386aa7d47f29c6dc7e4d4b Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Sun, 9 Jan 2022 16:33:17 -0800 Subject: [PATCH 10/11] Update core/src/main/resources/jenkins/split-plugins.txt Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com> --- core/src/main/resources/jenkins/split-plugins.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/resources/jenkins/split-plugins.txt b/core/src/main/resources/jenkins/split-plugins.txt index 73259d3b1c67..d51e0f9d1eb4 100644 --- a/core/src/main/resources/jenkins/split-plugins.txt +++ b/core/src/main/resources/jenkins/split-plugins.txt @@ -35,5 +35,5 @@ trilead-api 2.184 1.0.4 # JENKINS-64107 sshd 2.281 3.0.1 -javax-activation-api 2.328 1.2.0-2 -javax-mail-api 2.328 1.6.2-5 +javax-activation-api 2.329 1.2.0-2 +javax-mail-api 2.329 1.6.2-5 From ed7b370f7cad4f05ab34b1a2ed502ee89687f0ef Mon Sep 17 00:00:00 2001 From: Basil Crow Date: Tue, 11 Jan 2022 08:37:11 -0800 Subject: [PATCH 11/11] Update core/src/main/resources/jenkins/split-plugins.txt Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com> --- core/src/main/resources/jenkins/split-plugins.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/resources/jenkins/split-plugins.txt b/core/src/main/resources/jenkins/split-plugins.txt index d51e0f9d1eb4..823c851988cc 100644 --- a/core/src/main/resources/jenkins/split-plugins.txt +++ b/core/src/main/resources/jenkins/split-plugins.txt @@ -35,5 +35,5 @@ trilead-api 2.184 1.0.4 # JENKINS-64107 sshd 2.281 3.0.1 -javax-activation-api 2.329 1.2.0-2 -javax-mail-api 2.329 1.6.2-5 +javax-activation-api 2.330 1.2.0-2 +javax-mail-api 2.330 1.6.2-5