Installing JAR

For your projects, you may require Sun JAR files. For licensing reasons, they are not included in the Maestro distribution. To obtain these files, do the following:

  1. Download the JAR file you need.
  2. Install it into your local repository.

Sun JARS are not all located in one place, so first you'll have to locate the JAR file. To do so, specify the Sun JAR as a dependency in your pom.xml file, then run "mvn" or "mvn package" and you will get an error message back. This error message includes information about where the JAR file is located and how to install it into your local repository.

The following example illustrates the steps to perform in locating the Sun JAR file activation.jar.

Note: These steps assume you have already added the dependency for the missing JAR to your pom.xml file and you are ready to build.

  1. Run mvn install. This will not build successfully, but it will tell you where to locate the missing JAR file from and how to install it. You will see output similar to this:
      [WARNING] Unable to get resource from repository central (
      [INFO] ------------------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve artifact.
        1) javax.activation:activation:jar:1.0.2
          Try downloading the file manually from:
          Then, install it using the command:
            mvn install:install-file -DgroupId=javax.activation -DartifactId=activation -Dversion=1.0.2 -Dpackaging=jar -Dfile=/path/to/file
          Path to dependency:
          1) javax.mail:mail:jar:1.3.1
          2) javax.activation:activation:jar:1.0.2
      1 required artifact is missing.
      for artifact:
      from the specified remote repositories:
        central (
  2. Follow the instructions in the output to download and install the JAR file from the site specified. For example:

    If the downloaded file is in ZIP format, unzip it.

  3. Install the JAR file into your local repository, run the mvn command specified in the output. For this example, copy the activation.jar JAR file to the same directory as your pom.xml file. Then type the command:

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

    The following options were added to the mvn command:

    • groupId and artifactId: Sun JARS do not follow a standard naming scheme so check the Maven Wiki page for help in determining the groupId and artifactId.
    • -Dfile: This argument specifies the path to the JAR file. If, for example, you had placed the JAR file in /temp, then you would specify it as: -Dfile=/temp/activation.jar.

    The mvn command you just executed will put the JAR file into your local maven repository. For example, if your local repository is under your home directory, the JAR file would be placed here: [user_home]/.m2/repository/javax/activation/activation/1.0.2.

    <name>JavaMail API</name>
      The JavaMail API provides a platform-independent and protocol-independent
      framework to build mail and messaging applications.

Copy the dependency information into the pom.xml file for your project, then start at step 1 above.

For more information on this process, go to: