diff --git a/logback-classic-blackbox/pom.xml b/logback-classic-blackbox/pom.xml
index a9d99068a5..a0ae020233 100644
--- a/logback-classic-blackbox/pom.xml
+++ b/logback-classic-blackbox/pom.xml
@@ -23,16 +23,25 @@
- jakarta.servlet
- jakarta.servlet-api
+ javax.mail
+ javax.mail-api
+ test
- jakarta.mail
- jakarta.mail-api
- compile
+ com.sun.mail
+ javax.mail
+ test
+
+
+
+ javax.servlet
+ javax.servlet-api
+ test
+
+
org.codehaus.janino
janino
diff --git a/logback-classic/pom.xml b/logback-classic/pom.xml
index 8f879cdc4c..80aef35bfe 100755
--- a/logback-classic/pom.xml
+++ b/logback-classic/pom.xml
@@ -116,10 +116,7 @@
junit
junit
-
- com.sun.mail
- jakarta.mail
-
+
diff --git a/logback-core-blackbox/pom.xml b/logback-core-blackbox/pom.xml
index 613ccad704..f49f124914 100644
--- a/logback-core-blackbox/pom.xml
+++ b/logback-core-blackbox/pom.xml
@@ -25,22 +25,25 @@
- jakarta.servlet
- jakarta.servlet-api
+ javax.mail
+ javax.mail-api
+ test
+ true
- jakarta.mail
- jakarta.mail-api
- compile
+ javax.activation
+ javax.activation-api
+ test
- org.codehaus.janino
- janino
- compile
+ com.sun.mail
+ javax.mail
+ runtime
+