Migrate From Sun Mail to Eclipse Angus Mail

Migrate your implementation project from Sun Mail to Eclipse Angus Mail to upgrade from brXM v15 to v16.

The distribution as created by the Maven dist profile has changed due to the migration from Sun Mail to Eclipse Angus Mail.

Eclipse Angus provides mail-api and activation-api implementations, replacing the previously used Sun implementations. A major difference is that, while Sun jakarta.activation.jar and jakarta.mail.jar include the API classes, Angus requires separate jakarta.activation-api and jakarta.mail-api packages to be added to the distribution.

In recent brXM 15.x versions, Sun's mail jar and activation jars were included in the Tomcat /common/lib directory in the distribution.

In brXM 16.0, the following should be in the common/lib directory of the distribution:

  • angus-activation-2.0.2-jar

  • angus-mail-2.0.3.jar

  • jakarta.activation-api-2.1.3.jar

  • jakarta.mail-api-2.1.3.jar

None of the above jars should be in included in the CMS and site wars.

Follow the steps below to migrate your implementation project.

Update Assembly Includes

Change the following includes in /src/main/assembly/common-lib-component.xml:




Update Java References

In Java files, replace any com.sun.mail.smtp.* occurrences with org.eclipse.angus.mail.smtp.*.

In brXM product code, this change was applied once in the class com.onehippo.cms7.eforms.hst.util.mail.MailTemplate from the Enterprise Forms addon, specifically used by the ConfirmationBehavior and MailFormDataBehavior.

Verify Dependencies and Jars

Verify your implementation project's dependency tree and the resulting CMS and site webapps in the distribution, they should not contain any mail(-api) or activation(-api) jars.

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?