Last updated Mar 27, 2024

Maven cannot find Java Mail, Java Activation or JTA

When you run the shell scripts in the Atlassian Plugin SDK, Maven may complain that it cannot find Java Mail, Java Activation or JTA.

For example, for the Java Activation, Maven will give this error:

Embedded error: Missing: javax.activation:activation:jar:1.0.2

Background to this Problem

Sun will not allow Maven to redistribute its binaries. Instead, all users must install Sun binaries manually by downloading them from Sun's website and running the atlas-mvn install command. You'll find instructions in the Maven documentation here and here.

Installing the Sun Binaries

You will find the Sun binaries in these locations:

The Maven install command looks like this:

1
2
atlas-mvn install:install-file -DgroupId=javax.XXXXX -DartifactId=XXXXX \
  -Dversion=X.X.X -Dpackaging=jar -Dfile=/path/to/XXXX-X_X_X.jar

Below, as an example of the detailed installation process, we give specific instructions on installing the JavaBeans Activation Framework (JAF).

Installing the JavaBeans Activation Framework (JAF)

  1. Download JAF.

  2. Unzip the downloaded file.

  3. Go to the folder which contains the activation.jar file that you have just unzipped.

  4. Install JAF using the following command:

    1
    2
    atlas-mvn install:install-file -DgroupId=javax.activation -DartifactId=activation -Dversion=1.0.2 -Dpackaging=jar -Dfile=activation.jar
    

Rate this page: