Skip to content

Commit

Permalink
Adapt to Jakarta Activation and Jakarta Mail upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
basil committed Mar 4, 2024
1 parent 2c218db commit 15a6cfc
Showing 1 changed file with 51 additions and 13 deletions.
64 changes: 51 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,25 @@
<scope>import</scope>
<type>pom</type>
</dependency>
<!-- TODO Remove once in BOM -->
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>jakarta-activation-api</artifactId>
<version>2.1.3-1</version>
</dependency>
<!-- TODO Remove once in BOM -->
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>jakarta-mail-api</artifactId>
<version>2.1.3-1</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>jakarta-mail-api</artifactId>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
Expand Down Expand Up @@ -152,28 +168,34 @@
<artifactId>matrix-project</artifactId>
<scope>test</scope>
</dependency>
<!--
This must come before jakarta-mail-api in the class path in order to avoid eclipse-ee4j/mail#350.
-->
<dependency>
<groupId>org.jvnet.mock-javamail</groupId>
<artifactId>mock-javamail</artifactId>
<version>2.1</version>
<version>2.2</version>
<scope>test</scope>
<exclusions>
<!-- Provided by jakarta-activation-api plugin -->
<exclusion>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</exclusion>
<!-- Provided by jakarta-mail-api plugin -->
<exclusion>
<groupId>jakarta.mail</groupId>
<artifactId>jakarta.mail-api</artifactId>
</exclusion>
<!-- Provided by jakarta-activation-api plugin -->
<exclusion>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-activation</artifactId>
</exclusion>
<!-- Provided by jakarta-mail-api plugin -->
<exclusion>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-mail</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--
This must come after mock-javamail in the class path in order to avoid eclipse-ee4j/mail#350.
-->
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>jakarta-mail-api</artifactId>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness-tools</artifactId>
Expand Down Expand Up @@ -224,4 +246,20 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<mail.smtp.class>org.jvnet.mock_javamail.MockTransport</mail.smtp.class>
<mail.pop3.class>org.jvnet.mock_javamail.MockStore</mail.pop3.class>
<mail.imap.class>org.jvnet.mock_javamail.MockStore</mail.imap.class>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 15a6cfc

Please sign in to comment.