Skip to end of metadata
Go to start of metadata

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:

Issue with Atlassian Plugin SDK

Icon

A known issue with the Atlassian Plugin SDK is causing problems with maven parameters. You may need to run the above command directly from your maven directory. Please see AMPS-197 for more information.

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:

    Issue with Atlassian Plugin SDK

    Icon

    A known issue with the Atlassian Plugin SDK is causing problems with maven parameters. You may need to run the above command directly from your maven directory. Please see AMPS-197 for more information.

  • No labels

6 Comments

  1. It seems some of them are now available: http://jroller.com/carlossg/entry/sun_jars_available_in_maven

    You might want to update the references.

    1. Hi Wim,

      we are aware of that, thank you for pointing it out though. However the versions of the SUN libraries that are in the maven repository don't necessarily match the versions we use in our products, so we can't rely on those quite yet. As far as I am aware the licensing of the earlier versions we use has not changed and therefore they won't ever be available in the central repository. Until all our products upgrade their version of the SUN libraries we are out of luck.

      By the way the Atlassian Plugin SDK bundles those libraries so that the internal maven can find them. This should remove the need to install those manually and simplify greatly the process.

  2. Samual Le Berrigaud made a comment that the latest Plugin SDK makes manual installation of these plugins unnecessary. I believe this is incorrect. When using the latest Atlassian Plugin SDK (3.0.4), neither JTA nor JNDI were found. I got the error message below.

    Also, because the Plugin SDK wraps the entire Maven environment, this page should instruct the user to run the "atlas-mvn" wrapper command rather than "mvn" directly.

    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Unable to execute mojo
    
    Embedded error: Missing:
    ----------
    1) jta:jta:jar:1.0.1
    
      Try downloading the file manually from the project website.
    
      Then, install it using the command:
          mvn install:install-file -DgroupId=jta -DartifactId=jta -Dversion=1.0.1 -Dpackaging=jar -Dfile=/path/to/file
    
      Alternatively, if you host your own repository you can deploy the file there:
          mvn deploy:deploy-file -DgroupId=jta -DartifactId=jta -Dversion=1.0.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
    
      Path to dependency:
            1) com.xyz.jira.plugins:netsuitelink:atlassian-plugin:1.1
            2) com.atlassian.jira:atlassian-jira:jar:4.0.1
            3) jta:jta:jar:1.0.1
    
    2) jndi:jndi:jar:1.2.1
    
      Try downloading the file manually from the project website.
    
      Then, install it using the command:
          mvn install:install-file -DgroupId=jndi -DartifactId=jndi -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file
    
      Alternatively, if you host your own repository you can deploy the file there:
          mvn deploy:deploy-file -DgroupId=jndi -DartifactId=jndi -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
    
      Path to dependency:
            1) com.rapid7.jira.plugins:netsuitelink:atlassian-plugin:1.1
            2) com.atlassian.jira:atlassian-jira:jar:4.0.1
            3) jndi:jndi:jar:1.2.1
    
    ----------
    2 required artifacts are missing.
    
    for artifact:
      com.rapid7.jira.plugins:netsuitelink:atlassian-plugin:1.1
    
    from the specified remote repositories:
      atlassian-plugin-sdk (file:///c/r7/infra/atlassian-plugin-sdk-3.0.4/repository),
      central (http://repo1.maven.org/maven2),
      atlassian-public (https://m2proxy.atlassian.com/repository/public)
    
    1. Hi Chad,

      the SDK comes with a pre-populated repository that contains the libraries you're missing. This is the repository referred as atlassian-plugin-sdk in the error message above. The path it gives (file:///c/r7/infra/atlassian-plugin-sdk-3.0.4/repository) however seems a bit strange and is probably the cause of your problem. The SDK computes that path automatically for you, maybe there is a bug here.

      I assume you're using windows and the path should probably looks like file:///c:/r7/infra/atlassian-plugin-sdk-3.0.4/repository? (note the extra :). Am I right?
      If I am right, one work around for now would be to hard code the path to the repository in the settings.xml that comes with the SDK, you can find it under atlassian-plugin-sdk-3.0.4/apache-maven/conf/settings.xml, find the repository with id atlassian-plugin-sdk and replace its url from file://${env.ATLAS_HOME}/repository to file:///c:/r7/infra/atlassian-plugin-sdk-3.0.4/repository.

      If I am correct, can you please file an issue at https://studio.atlassian.com/browse/AMPS describing your environment, which version of windows do you use, which console (windows or cygwin), etc. So that we can try to reproduce and fix in the next version of the SDK. Thanks.

      On using atlas-mvn instead of simply mvn on that page of the documentation this doesn't actually make any difference. We could probably do it for consistency.
      In the end the SDK will share the same local repository as any normal maven installation. So as all the example just install some artifacts locally, this shouldn't be an issue. I will update the page though (wink)

      Thanks for your comment.

      1. I am having the same problem as the other developer but this is with a newer version of the SDK.  3.2

        My default install is missing 3 artifacts.

        1) javax.jms:jms:jar:1.1
          Try downloading the file manually from the project website.
          Then, install it using the command: 
              mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file
          Alternatively, if you host your own repository you can deploy the file there: 
              mvn deploy:deploy-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
          Path to dependency: 
           1) com.atlassian.plugin.tutorial1:jira-gadget-tutorial-plugin1:pom:pom:1.0-SNAPSHOT
           2) com.atlassian.jira:atlassian-jira:jar:4.0.1
           3) log4j:log4j:jar:1.2.15
           4) javax.jms:jms:jar:1.1
        2) jndi:jndi:jar:1.2.1
          Try downloading the file manually from the project website.
          Then, install it using the command: 
              mvn install:install-file -DgroupId=jndi -DartifactId=jndi -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file
          Alternatively, if you host your own repository you can deploy the file there: 
              mvn deploy:deploy-file -DgroupId=jndi -DartifactId=jndi -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
          Path to dependency: 
           1) com.atlassian.plugin.tutorial1:jira-gadget-tutorial-plugin1:pom:pom:1.0-SNAPSHOT
           2) com.atlassian.jira:atlassian-jira:jar:4.0.1
           3) jndi:jndi:jar:1.2.1
        3) jta:jta:jar:1.0.1
          Try downloading the file manually from the project website.
        1) javax.jms:jms:jar:1.1

          Try downloading the file manually from the project website.

          Then, install it using the command: 

              mvn install:install-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file

          Alternatively, if you host your own repository you can deploy the file there: 

              mvn deploy:deploy-file -DgroupId=javax.jms -DartifactId=jms -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

          Path to dependency: 

          1) com.atlassian.plugin.tutorial1:jira-gadget-tutorial-plugin1:pom:pom:1.0-SNAPSHOT

          2) com.atlassian.jira:atlassian-jira:jar:4.0.1

          3) log4j:log4j:jar:1.2.15

          4) javax.jms:jms:jar:1.1

        2) jndi:jndi:jar:1.2.1

          Try downloading the file manually from the project website.

          Then, install it using the command: 

              mvn install:install-file -DgroupId=jndi -DartifactId=jndi -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file

          Alternatively, if you host your own repository you can deploy the file there: 

              mvn deploy:deploy-file -DgroupId=jndi -DartifactId=jndi -Dversion=1.2.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

          Path to dependency: 

          1) com.atlassian.plugin.tutorial1:jira-gadget-tutorial-plugin1:pom:pom:1.0-SNAPSHOT

          2) com.atlassian.jira:atlassian-jira:jar:4.0.1

          3) jndi:jndi:jar:1.2.1

        3) jta:jta:jar:1.0.1

          Try downloading the file manually from the project website.

        Then, install it using the command: 
              mvn install:install-file -DgroupId=jta -DartifactId=jta -Dversion=1.0.1 -Dpackaging=jar -Dfile=/path/to/file

          Alternatively, if you host your own repository you can deploy the file there: 
              mvn deploy:deploy-file -DgroupId=jta -DartifactId=jta -Dversion=1.0.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

          Path to dependency: 
          1) com.atlassian.plugin.tutorial1:jira-gadget-tutorial-plugin1:pom:pom:1.0-SNAPSHOT
          2) com.atlassian.jira:atlassian-jira:jar:4.0.1
          3) jta:jta:jar:1.0.1

        ----------
        3 required artifacts are missing.

        for artifact: 
          com.atlassian.plugin.tutorial1:jira-gadget-tutorial-plugin1:pom:1.0-SNAPSHOT

        from the specified remote repositories:
          atlassian-public (http://m2proxy.atlassian.com/repository/public, releases=true, snapshots=true),
          atlassian-plugin-sdk ([file://$]

        Unknown macro: {env.ATLAS_HOME}

        /repository, releases=true, snapshots=false),
          central (http://repo1.maven.org/maven2, releases=true, snapshots=false)

        I noticed my ATLAS_HOME was not set correctly so I fixed that...but upon building a new plugin skeleton created by atlas-create-jira-plugin
        I just get this error

         [WARN] Failed to retrieve plugin descriptor for Plugin [org.apache.maven.plugins:maven-deploy-plugin]: Plugin org.apache.maven.plugins:maven-deploy-plugin:2.4 or one of its dependencies could not be resolved: The repository system is offline and the requested artifact is not locally available at C:\Users\omarh.HIRSCH\.m2\repository\org\apache\maven\plugins\maven-deploy-plugin\2.4\maven-deploy-plugin-2.4.jar

          org.apache.maven.plugins:maven-deploy-plugin:maven-plugin:2.4

        from the specified remote repositories:

          atlassian-public (http://m2proxy.atlassian.com/repository/public, releases=true, snapshots=true),

          central (http://repo1.maven.org/maven2, releases=true, snapshots=false)

        11/2/10 10:55:03 AM PDT: [WARN] Failed to retrieve plugin descriptor for Plugin [org.apache.maven.plugins:maven-install-plugin]: Plugin org.apache.maven.plugins:maven-install-plugin:2.3 or one of its dependencies could not be resolved: The repository system is offline and the requested artifact is not locally available at C:\Users\omarh.HIRSCH\.m2\repository\org\apache\maven\plugins\maven-install-plugin\2.3\maven-install-plugin-2.3.jar

          org.apache.maven.plugins:maven-install-plugin:maven-plugin:2.3

        from the specified remote repositories:

          atlassian-public (http://m2proxy.atlassian.com/repository/public, releases=true, snapshots=true),

          central (http://repo1.maven.org/maven2, releases=true, snapshots=false)

        11/2/10 10:55:03 AM PDT: Build errors for jira-gadget-tutorial-plugin; or