Skip to content

Commit

Permalink
Adapt to Jakarta Activation and Jakarta Mail upgrades (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Mar 4, 2024
1 parent 7bd6b9b commit c91f60c
Showing 1 changed file with 57 additions and 18 deletions.
75 changes: 57 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
Expand Down Expand Up @@ -36,6 +37,18 @@
<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>

Expand All @@ -53,18 +66,6 @@
<groupId>org.jenkins-ci.modules</groupId>
<artifactId>instance-identity</artifactId>
</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>
<scope>test</scope>
</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>
Expand All @@ -84,12 +85,6 @@
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-basic-steps</artifactId>
<scope>test</scope>
<exclusions>
<exclusion> <!-- Not even sure how this was possible to begin with? -->
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>mailer</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand All @@ -116,6 +111,34 @@
<artifactId>script-security</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jvnet.mock-javamail</groupId>
<artifactId>mock-javamail</artifactId>
<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>org.eclipse.angus</groupId>
<artifactId>angus-mail</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- JCasC compatibility -->
<dependency>
<groupId>io.jenkins</groupId>
Expand Down Expand Up @@ -146,4 +169,20 @@
<url>https://repo.jenkins-ci.org/public/</url>
</pluginRepository>
</pluginRepositories>

<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 c91f60c

Please sign in to comment.