From 3a2703e8f60cb8664dd2cee605b522146ee41bd5 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Sun, 6 Nov 2022 20:20:58 +0000 Subject: [PATCH] Upgrade to Jakarta Mail 2.1 and switch to Eclipse Angus RI Closes gh-33059 Closes gh-33050 --- .../build.gradle | 2 +- .../spring-boot-actuator/build.gradle | 2 +- .../spring-boot-autoconfigure/build.gradle | 2 +- .../spring-boot-dependencies/build.gradle | 27 +++++++++++-------- .../spring-boot-starter-mail/build.gradle | 2 +- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle index 2a35f4db67..e391b8491f 100644 --- a/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-actuator-autoconfigure/build.gradle @@ -43,7 +43,6 @@ dependencies { optional("com.github.ben-manes.caffeine:caffeine") optional("com.hazelcast:hazelcast") optional("com.hazelcast:hazelcast-spring") - optional("com.sun.mail:jakarta.mail") optional("com.zaxxer:HikariCP") optional("io.dropwizard.metrics:metrics-jmx") optional("io.lettuce:lettuce-core") @@ -100,6 +99,7 @@ dependencies { optional("org.aspectj:aspectjweaver") optional("org.cache2k:cache2k-micrometer") optional("org.cache2k:cache2k-spring") + optional("org.eclipse.angus:angus-mail") optional("org.eclipse.jetty:jetty-server") { exclude group: "org.eclipse.jetty.toolchain", module: "jetty-jakarta-servlet-api" } diff --git a/spring-boot-project/spring-boot-actuator/build.gradle b/spring-boot-project/spring-boot-actuator/build.gradle index 9afd93c1cc..1b89ee5f06 100644 --- a/spring-boot-project/spring-boot-actuator/build.gradle +++ b/spring-boot-project/spring-boot-actuator/build.gradle @@ -19,7 +19,6 @@ dependencies { optional("com.github.ben-manes.caffeine:caffeine") optional("com.hazelcast:hazelcast") optional("com.hazelcast:hazelcast-spring") - optional("com.sun.mail:jakarta.mail") optional("com.zaxxer:HikariCP") optional("io.lettuce:lettuce-core") optional("io.micrometer:micrometer-observation") @@ -38,6 +37,7 @@ dependencies { optional("org.aspectj:aspectjweaver") optional("org.cache2k:cache2k-micrometer") optional("org.cache2k:cache2k-spring") + optional("org.eclipse.angus:angus-mail") optional("org.eclipse.jetty:jetty-server") { exclude(group: "org.eclipse.jetty.toolchain", module: "jetty-jakarta-servlet-api") } diff --git a/spring-boot-project/spring-boot-autoconfigure/build.gradle b/spring-boot-project/spring-boot-autoconfigure/build.gradle index b3a97ccb8e..7420c840a2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/build.gradle +++ b/spring-boot-project/spring-boot-autoconfigure/build.gradle @@ -29,7 +29,6 @@ dependencies { optional("com.oracle.database.jdbc:ojdbc8") optional("com.oracle.database.jdbc:ucp") optional("com.samskivert:jmustache") - optional("com.sun.mail:jakarta.mail") optional("io.lettuce:lettuce-core") optional("io.projectreactor.netty:reactor-netty-http") optional("io.r2dbc:r2dbc-spi") @@ -65,6 +64,7 @@ dependencies { optional("org.apache.tomcat:tomcat-jdbc") optional("org.apiguardian:apiguardian-api") optional("org.apache.groovy:groovy-templates") + optional("org.eclipse.angus:angus-mail") optional("com.github.ben-manes.caffeine:caffeine") optional("com.github.mxab.thymeleaf.extras:thymeleaf-extras-data-attribute") optional("com.sendgrid:sendgrid-java") { diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index abf9df9c6a..f12e46ca09 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -14,6 +14,21 @@ bom { issueLabels = ["type: dependency-upgrade"] } } + library("Angus Mail", "1.0.0") { + group("org.eclipse.angus") { + modules = [ + "angus-core", + "angus-mail", + "angus-dsn", + "angus-gimap", + "angus-imap", + "jakarta.mail", + "logging-mailhandler", + "pop3", + "smtp" + ] + } + } library("Artemis", "2.26.0") { group("org.apache.activemq") { modules = [ @@ -505,10 +520,7 @@ bom { ] } } - library("Jakarta Mail", "2.0.1") { - prohibit("[2.1.0-RC1,)") { - because "it exceeds our Jakarta EE 9 baseline" - } + library("Jakarta Mail", "2.1.0") { group("jakarta.mail") { modules = [ "jakarta.mail-api" @@ -1489,13 +1501,6 @@ bom { ] } } - library("Sun Mail", "2.0.1") { - group("com.sun.mail") { - modules = [ - "jakarta.mail" - ] - } - } library("Thymeleaf", "3.1.0.RC1") { group("org.thymeleaf") { modules = [ diff --git a/spring-boot-project/spring-boot-starters/spring-boot-starter-mail/build.gradle b/spring-boot-project/spring-boot-starters/spring-boot-starter-mail/build.gradle index 07ae466625..73cb72a7ea 100644 --- a/spring-boot-project/spring-boot-starters/spring-boot-starter-mail/build.gradle +++ b/spring-boot-project/spring-boot-starters/spring-boot-starter-mail/build.gradle @@ -7,5 +7,5 @@ description = "Starter for using Java Mail and Spring Framework's email sending dependencies { api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter")) api("org.springframework:spring-context-support") - api("com.sun.mail:jakarta.mail") + api("org.eclipse.angus:jakarta.mail") }