From b1da7bd61335d6db154df955a68b77a9ba689be3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Barto=C5=A1?= Date: Thu, 19 Jan 2023 13:10:19 +0100 Subject: [PATCH] Revert Mail API --- Quarkus3 branch sync no. 13 (11.4.2023) Resolved conflicts: keycloak/quarkus/pom.xml - Modified --- Quarkus3 branch sync no. 12 (31.3.2023) Resolved conflicts: keycloak/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/sessionlimits/UserSessionLimitsTest.java - Modified --- pom.xml | 13 +++++++++++-- quarkus/pom.xml | 2 +- quarkus/runtime/pom.xml | 7 ++++++- services/pom.xml | 6 +++++- .../email/DefaultEmailSenderProvider.java | 18 +++++++++--------- .../keycloak/testsuite/util/GreenMailRule.java | 2 +- .../org/keycloak/testsuite/util/MailUtils.java | 8 ++++---- .../util/MessageHandlerFactoryImpl.java | 6 +++--- ...dActionUpdateEmailWithVerificationTest.java | 8 ++++---- .../RequiredActionEmailVerificationTest.java | 4 ++-- ...ionUpdateEmailTestWithVerificationTest.java | 8 ++++---- .../testsuite/admin/SMTPConnectionTest.java | 2 +- .../org/keycloak/testsuite/admin/UserTest.java | 2 +- .../broker/AbstractFirstBrokerLoginTest.java | 2 +- ...thenticationSessionFailoverClusterTest.java | 2 +- .../crossdc/ActionTokenCrossDCTest.java | 4 ++-- .../federation/ldap/LDAPNoCacheTest.java | 4 ++-- .../federation/storage/UserStorageTest.java | 2 +- .../testsuite/forms/BrowserButtonsTest.java | 4 ++-- .../testsuite/forms/BruteForceTest.java | 2 +- .../keycloak/testsuite/forms/RegisterTest.java | 2 +- .../ResetCredentialsAlternativeFlowsTest.java | 2 +- .../testsuite/forms/ResetPasswordTest.java | 4 ++-- .../org/keycloak/testsuite/i18n/EmailTest.java | 4 ++-- .../keycloak/testsuite/util/MailAssert.java | 8 ++++---- .../keycloak/testsuite/util/MailServer.java | 8 ++++---- .../keycloak/testsuite/util/SslMailServer.java | 2 +- testsuite/utils/pom.xml | 11 ++++++++++- .../org/keycloak/testsuite/MailServer.java | 6 +++--- 29 files changed, 90 insertions(+), 63 deletions(-) diff --git a/pom.xml b/pom.xml index fa60efaf9f..3468e59494 100644 --- a/pom.xml +++ b/pom.xml @@ -90,6 +90,8 @@ 3.1.0 2.1.1 + 1.6.5 + 6.0.0 3.1.0 4.0.0 @@ -174,7 +176,8 @@ 21.5.0.0 - 2.0.0-alpha-3 + + 1.6.12 2.2 2.10 4.13.2 @@ -401,10 +404,16 @@ - + + + + com.sun.mail + jakarta.mail + ${com.sun.jakarta.mail.version} jakarta.ws.rs diff --git a/quarkus/pom.xml b/quarkus/pom.xml index 33a50095d8..f1f402a2d9 100644 --- a/quarkus/pom.xml +++ b/quarkus/pom.xml @@ -46,7 +46,7 @@ 2.0.1.Final 1.4.1.SP1 1.8.3 - 1.17 + 2.0.1 UTF-8 3.8.1 diff --git a/quarkus/runtime/pom.xml b/quarkus/runtime/pom.xml index 010a19526e..fdd097a164 100644 --- a/quarkus/runtime/pom.xml +++ b/quarkus/runtime/pom.xml @@ -572,10 +572,15 @@ - + + + com.sun.mail + jakarta.mail + ${com.sun.jakarta.mail.version} org.apache.santuario diff --git a/services/pom.xml b/services/pom.xml index 5189eb9686..17c1060f57 100755 --- a/services/pom.xml +++ b/services/pom.xml @@ -55,9 +55,13 @@ freemarker provided - + + + com.sun.mail + jakarta.mail org.keycloak diff --git a/services/src/main/java/org/keycloak/email/DefaultEmailSenderProvider.java b/services/src/main/java/org/keycloak/email/DefaultEmailSenderProvider.java index 2bbf006e7d..6b848971ca 100644 --- a/services/src/main/java/org/keycloak/email/DefaultEmailSenderProvider.java +++ b/services/src/main/java/org/keycloak/email/DefaultEmailSenderProvider.java @@ -26,15 +26,15 @@ import org.keycloak.truststore.HostnameVerificationPolicy; import org.keycloak.truststore.JSSETruststoreConfigurator; import org.keycloak.vault.VaultStringSecret; -import jakarta.mail.Address; -import jakarta.mail.MessagingException; -import jakarta.mail.Multipart; -import jakarta.mail.Session; -import jakarta.mail.Transport; -import jakarta.mail.internet.AddressException; -import jakarta.mail.internet.InternetAddress; -import jakarta.mail.internet.MimeBodyPart; -import jakarta.mail.internet.MimeMultipart; +import javax.mail.Address; +import javax.mail.MessagingException; +import javax.mail.Multipart; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.AddressException; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; +import javax.mail.internet.MimeMultipart; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocketFactory; import java.io.UnsupportedEncodingException; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/GreenMailRule.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/GreenMailRule.java index 64418a1139..efc82f3efa 100755 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/GreenMailRule.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/GreenMailRule.java @@ -22,7 +22,7 @@ import com.icegreen.greenmail.util.ServerSetup; import org.junit.rules.ExternalResource; import org.keycloak.models.RealmModel; -import jakarta.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage; import java.lang.Thread.UncaughtExceptionHandler; import java.net.SocketException; import java.util.HashMap; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MailUtils.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MailUtils.java index c4f3be7058..22ff33a4cf 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MailUtils.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MailUtils.java @@ -17,10 +17,10 @@ package org.keycloak.testsuite.util; -import jakarta.mail.Address; -import jakarta.mail.MessagingException; -import jakarta.mail.Multipart; -import jakarta.mail.internet.MimeMessage; +import javax.mail.Address; +import javax.mail.MessagingException; +import javax.mail.Multipart; +import javax.mail.internet.MimeMessage; import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MessageHandlerFactoryImpl.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MessageHandlerFactoryImpl.java index 25c3a499c6..2e5bc9f9ee 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MessageHandlerFactoryImpl.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/util/MessageHandlerFactoryImpl.java @@ -5,9 +5,9 @@ import org.subethamail.smtp.MessageHandler; import org.subethamail.smtp.MessageHandlerFactory; import org.subethamail.smtp.RejectException; -import jakarta.mail.MessagingException; -import jakarta.mail.Session; -import jakarta.mail.internet.MimeMessage; +import javax.mail.MessagingException; +import javax.mail.Session; +import javax.mail.internet.MimeMessage; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/AppInitiatedActionUpdateEmailWithVerificationTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/AppInitiatedActionUpdateEmailWithVerificationTest.java index 01b4e12666..3660cc0571 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/AppInitiatedActionUpdateEmailWithVerificationTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/AppInitiatedActionUpdateEmailWithVerificationTest.java @@ -20,10 +20,10 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.io.IOException; -import jakarta.mail.Address; -import jakarta.mail.Message; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; +import javax.mail.Address; +import javax.mail.Message; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; import org.jboss.arquillian.graphene.page.Page; import org.junit.Assert; import org.junit.Rule; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionEmailVerificationTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionEmailVerificationTest.java index 55f88f55b6..f7d2ec3d6a 100755 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionEmailVerificationTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionEmailVerificationTest.java @@ -61,8 +61,8 @@ import org.keycloak.testsuite.util.UserActionTokenBuilder; import org.keycloak.testsuite.util.MailUtils; import java.io.Closeable; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; import java.io.IOException; import java.net.URISyntaxException; import java.util.Arrays; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionUpdateEmailTestWithVerificationTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionUpdateEmailTestWithVerificationTest.java index a4dd213539..49271c6248 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionUpdateEmailTestWithVerificationTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/actions/RequiredActionUpdateEmailTestWithVerificationTest.java @@ -21,10 +21,10 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.io.IOException; -import jakarta.mail.Address; -import jakarta.mail.Message; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; +import javax.mail.Address; +import javax.mail.Message; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; import org.jboss.arquillian.graphene.page.Page; import org.junit.Rule; import org.junit.Test; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/SMTPConnectionTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/SMTPConnectionTest.java index 814159ffb7..f0b33d8f0c 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/SMTPConnectionTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/SMTPConnectionTest.java @@ -27,7 +27,7 @@ import org.keycloak.testsuite.AbstractKeycloakTest; import org.keycloak.testsuite.util.GreenMailRule; import org.keycloak.testsuite.util.UserBuilder; -import jakarta.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage; import jakarta.ws.rs.core.Response; import java.util.HashMap; import java.util.List; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/UserTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/UserTest.java index cc89dfaf48..fdff2060b9 100755 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/UserTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/admin/UserTest.java @@ -88,7 +88,7 @@ import org.keycloak.util.JsonSerialization; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; -import jakarta.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage; import jakarta.ws.rs.BadRequestException; import jakarta.ws.rs.ClientErrorException; import jakarta.ws.rs.NotFoundException; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/AbstractFirstBrokerLoginTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/AbstractFirstBrokerLoginTest.java index c6d7a7c0ae..008e7f04f6 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/AbstractFirstBrokerLoginTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/AbstractFirstBrokerLoginTest.java @@ -2,7 +2,7 @@ package org.keycloak.testsuite.broker; import java.util.List; -import jakarta.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage; import jakarta.ws.rs.core.Response; import com.google.common.collect.ImmutableMap; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cluster/AuthenticationSessionFailoverClusterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cluster/AuthenticationSessionFailoverClusterTest.java index 6c9416fa5a..2dd2508c1f 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cluster/AuthenticationSessionFailoverClusterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/cluster/AuthenticationSessionFailoverClusterTest.java @@ -21,7 +21,7 @@ import static org.junit.Assert.assertEquals; import static org.keycloak.testsuite.util.WaitUtils.pause; import java.io.IOException; -import jakarta.mail.MessagingException; +import javax.mail.MessagingException; import org.jboss.arquillian.graphene.page.Page; import org.junit.Test; import org.keycloak.services.managers.AuthenticationSessionManager; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/ActionTokenCrossDCTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/ActionTokenCrossDCTest.java index d03ab5ef71..0d02fab58c 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/ActionTokenCrossDCTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/crossdc/ActionTokenCrossDCTest.java @@ -33,8 +33,8 @@ import org.keycloak.testsuite.util.MailUtils; import java.io.IOException; import java.util.LinkedList; import java.util.List; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; import jakarta.ws.rs.core.Response; import org.jboss.arquillian.graphene.page.Page; import org.junit.Assert; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/ldap/LDAPNoCacheTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/ldap/LDAPNoCacheTest.java index 4457e46f84..72472cfb2e 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/ldap/LDAPNoCacheTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/ldap/LDAPNoCacheTest.java @@ -23,8 +23,8 @@ import java.util.Collections; import java.util.List; import java.util.stream.Collectors; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; import org.jboss.arquillian.graphene.page.Page; import org.junit.ClassRule; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/UserStorageTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/UserStorageTest.java index 5af546a56f..7985e11fd1 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/UserStorageTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/federation/storage/UserStorageTest.java @@ -52,7 +52,7 @@ import org.keycloak.testsuite.util.GreenMailRule; import org.keycloak.testsuite.util.TestCleanup; import org.openqa.selenium.Cookie; -import jakarta.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage; import jakarta.ws.rs.NotFoundException; import jakarta.ws.rs.core.Response; import java.io.File; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BrowserButtonsTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BrowserButtonsTest.java index 50709befb2..8f6169f26e 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BrowserButtonsTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BrowserButtonsTest.java @@ -20,8 +20,8 @@ package org.keycloak.testsuite.forms; import static org.junit.Assert.assertEquals; import java.io.IOException; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; import org.jboss.arquillian.graphene.page.Page; import org.junit.Before; import org.junit.Rule; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java index cc96529ff4..e6e9c4f627 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/BruteForceTest.java @@ -49,7 +49,7 @@ import org.keycloak.testsuite.util.OAuthClient; import org.keycloak.testsuite.util.RealmRepUtil; import org.keycloak.testsuite.util.UserBuilder; -import jakarta.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage; import java.net.MalformedURLException; import java.util.Calendar; import java.util.Collections; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/RegisterTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/RegisterTest.java index 18b087357b..842055f733 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/RegisterTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/RegisterTest.java @@ -51,7 +51,7 @@ import org.keycloak.testsuite.util.MailUtils; import org.keycloak.testsuite.util.OAuthClient; import org.keycloak.testsuite.util.UserBuilder; -import jakarta.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage; import jakarta.ws.rs.core.Response; import java.io.IOException; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/ResetCredentialsAlternativeFlowsTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/ResetCredentialsAlternativeFlowsTest.java index 4fa1eb4929..bb29150dce 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/ResetCredentialsAlternativeFlowsTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/ResetCredentialsAlternativeFlowsTest.java @@ -48,7 +48,7 @@ import org.keycloak.testsuite.pages.PasswordPage; import org.keycloak.testsuite.pages.RegisterPage; import org.keycloak.testsuite.util.*; -import jakarta.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage; import java.util.Arrays; import java.util.List; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/ResetPasswordTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/ResetPasswordTest.java index c02d9ace03..299f093394 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/ResetPasswordTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/forms/ResetPasswordTest.java @@ -63,8 +63,8 @@ import org.keycloak.testsuite.util.SecondBrowser; import org.keycloak.testsuite.util.UserActionTokenBuilder; import org.keycloak.testsuite.util.UserBuilder; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; import java.io.Closeable; import java.io.IOException; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/i18n/EmailTest.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/i18n/EmailTest.java index 993df9c487..e65da22483 100755 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/i18n/EmailTest.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/i18n/EmailTest.java @@ -20,8 +20,8 @@ import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; import java.io.IOException; import java.util.Arrays; import org.jboss.arquillian.graphene.page.Page; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/MailAssert.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/MailAssert.java index c40bd28710..e2bb967856 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/MailAssert.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/MailAssert.java @@ -19,10 +19,10 @@ package org.keycloak.testsuite.util; import org.jboss.logging.Logger; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; -import jakarta.mail.internet.MimeMessage.RecipientType; -import jakarta.mail.internet.MimeMultipart; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage.RecipientType; +import javax.mail.internet.MimeMultipart; import java.io.IOException; import static org.junit.Assert.assertEquals; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/MailServer.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/MailServer.java index 362a522405..c3f6c22a3e 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/MailServer.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/MailServer.java @@ -21,10 +21,10 @@ import com.icegreen.greenmail.util.GreenMail; import com.icegreen.greenmail.util.ServerSetup; import org.jboss.logging.Logger; -import jakarta.mail.MessagingException; -import jakarta.mail.internet.MimeMessage; -import jakarta.mail.internet.MimeMessage.RecipientType; -import jakarta.mail.internet.MimeMultipart; +import javax.mail.MessagingException; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage.RecipientType; +import javax.mail.internet.MimeMultipart; import java.io.IOException; import java.lang.Thread.UncaughtExceptionHandler; import java.net.SocketException; diff --git a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/SslMailServer.java b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/SslMailServer.java index fd457b8574..cfaf5e26bc 100644 --- a/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/SslMailServer.java +++ b/testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/util/SslMailServer.java @@ -20,7 +20,7 @@ package org.keycloak.testsuite.util; import org.jboss.logging.Logger; import org.subethamail.smtp.server.SMTPServer; -import jakarta.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocket; diff --git a/testsuite/utils/pom.xml b/testsuite/utils/pom.xml index 4fd78ee4b3..3d42e5e3f1 100755 --- a/testsuite/utils/pom.xml +++ b/testsuite/utils/pom.xml @@ -35,9 +35,13 @@ - + + + com.sun.mail + jakarta.mail org.bouncycastle @@ -286,6 +290,11 @@ ${mssql-jdbc.version} + + commons-io + commons-io + ${commons-io.version} + diff --git a/testsuite/utils/src/main/java/org/keycloak/testsuite/MailServer.java b/testsuite/utils/src/main/java/org/keycloak/testsuite/MailServer.java index 73cdd62501..1c8fe27a55 100755 --- a/testsuite/utils/src/main/java/org/keycloak/testsuite/MailServer.java +++ b/testsuite/utils/src/main/java/org/keycloak/testsuite/MailServer.java @@ -20,9 +20,9 @@ package org.keycloak.testsuite; import com.icegreen.greenmail.util.GreenMail; import com.icegreen.greenmail.util.ServerSetup; -import jakarta.mail.internet.MimeMessage; -import jakarta.mail.internet.MimeMessage.RecipientType; -import jakarta.mail.internet.MimeMultipart; +import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMessage.RecipientType; +import javax.mail.internet.MimeMultipart; public class MailServer {