Skip to content

Commit

Permalink
move to jakarta.mail
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <[email protected]>
  • Loading branch information
ceki committed Aug 5, 2021
1 parent db6259d commit b6c3b45
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 38 deletions.
6 changes: 4 additions & 2 deletions logback-access/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@
<artifactId>hsqldb</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>

</dependencies>

<build>
Expand Down
19 changes: 12 additions & 7 deletions logback-classic/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,21 @@
<artifactId>mysql-connector-java</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<scope>runtime</scope>
</dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
Expand All @@ -125,7 +130,7 @@
<dependency>
<groupId>com.icegreen</groupId>
<artifactId>greenmail</artifactId>
<version>1.5.10</version>
<version>2.0.0-alpha-1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
1 change: 1 addition & 0 deletions logback-classic/src/main/java9/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
requires org.slf4j;
requires static java.management;
requires static javax.servlet.api;

requires ch.qos.logback.core;
uses ch.qos.logback.classic.spi.Configurator;
provides org.slf4j.spi.SLF4JServiceProvider with ch.qos.logback.classic.spi.LogbackServiceProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
import org.junit.Test;
import org.slf4j.MDC;

import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import jakarta.mail.MessagingException;
import jakarta.mail.internet.MimeMessage;
import jakarta.mail.internet.MimeMultipart;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

import javax.mail.Part;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import jakarta.mail.Part;
import jakarta.mail.internet.MimeMessage;
import jakarta.mail.internet.MimeMultipart;

import org.dom4j.io.SAXReader;
import org.junit.After;
Expand Down
22 changes: 15 additions & 7 deletions logback-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,26 @@
<artifactId>jansi</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<scope>compile</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.mockito</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/
package ch.qos.logback.core.net;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;
import jakarta.mail.Authenticator;
import jakarta.mail.PasswordAuthentication;

/**
* Used by SMTPAppender for authentication purposes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
import java.util.Properties;
import java.util.concurrent.Future;

import javax.mail.Message;
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.MimeMessage;
import javax.mail.internet.MimeMultipart;
import jakarta.mail.Message;
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.MimeMessage;
import jakarta.mail.internet.MimeMultipart;
import javax.naming.Context;
import javax.naming.InitialContext;

Expand Down
4 changes: 3 additions & 1 deletion logback-core/src/main/java9/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
requires static transitive java.sql;
requires static transitive java.naming;
requires static transitive java.xml;
requires static javax.mail.api;
requires static jakarta.mail;
requires static jakarta.activation;

requires static javax.servlet.api;
requires static janino;
requires static commons.compiler;
Expand Down
30 changes: 26 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>4.12</junit.version>
<hamcrest.version>1.3</hamcrest.version>
<javax.mail.version>1.6.2</javax.mail.version>
<!--<javax.mail.version>1.6.2</javax.mail.version>-->
<jakarta.mail.version>2.0.1</jakarta.mail.version>
<janino.version>3.1.6</janino.version>
<!-- slf4j.version property is used below, in
logback-classic/pom.xml, /logback-examples/src/main/resources/setClasspath.cmd, download.htnl
Expand Down Expand Up @@ -166,16 +167,37 @@
<artifactId>jansi</artifactId>
<version>${jansi.version}</version>
</dependency>

<!--
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>${javax.mail.version}</version>
</dependency>
<dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<artifactId>javax.mail</artifactId>
<version>${javax.mail.version}</version>
</dependency>
</dependency>
-->

<dependency>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
<version>${jakarta.mail.version}</version>
</dependency>

<dependency>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>${jakarta.mail.version}</version>
</dependency>

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>${jakarta.mail.version}</version>
</dependency>

<dependency>
<groupId>org.dom4j</groupId>
Expand Down

0 comments on commit b6c3b45

Please sign in to comment.