How to download JavaMail (mail.jar) and JAF (activation.jar) using maven

30,858

Solution 1

You simply need to add this dependency to your maven project:

<dependency>
    <groupId>com.sun.mail</groupId>
    <artifactId>javax.mail</artifactId>
    <version>1.5.6</version>
</dependency>

No need to add activation too (unless you want to use a specific version) as it is already a dependency of javax.mail such that it will be added as dependency to your project by transitivity.


You can find all the artifacts' description in the home page of the javamail project.

Solution 2

Use the following links to get the required artifacts from the maven central repository:
https://mvnrepository.com/artifact/javax.mail/mail/1.4
https://mvnrepository.com/artifact/javax.activation/activation/1.1.1

Or

Add these to your pom.xml.

<dependency>
    <groupId>javax.mail</groupId>
    <artifactId>mail</artifactId>
    <version>1.4</version>
</dependency>
<dependency>
    <groupId>javax.activation</groupId>
    <artifactId>activation</artifactId>
    <version>1.1.1</version>
</dependency>
Share:
30,858
Bill_Data23
Author by

Bill_Data23

Updated on July 05, 2022

Comments