Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do you build an Atlassian Plugin with Bamboo

Joel Brass January 9, 2014

I am attempting to build a JIRA plugin with Bamboo. I have created my build plan and pointed the Maven 2 Capability for Bamboo to the one bundled with the Atlassian SDK.

I am able to build the plugin when using the "atlas-mvn clean test" from the command line. When running 'clean test' in the bamboo task - i get the following error messages.

Could not find test result reports in the D:\bamboo-home\xml-data\build-dir\PROD-AG-JOB1 directory.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

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.cprime.jira.widget:burn-up:atlassian-plugin:1.0-SNAPSHOT
          2) com.atlassian.jira:jira-core:jar:6.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.cprime.jira.widget:burn-up:atlassian-plugin:1.0-SNAPSHOT
          2) com.atlassian.jira:jira-core:jar:6.1
          3) jndi:jndi:jar:1.2.1

----------
2 required artifacts are missing.

for artifact: 
  com.cprime.jira.widget:burn-up:atlassian-plugin:1.0-SNAPSHOT

from the specified remote repositories:
  atlassian-plugin-sdk (file://${env.ATLAS_HOME}/repository),
  central (http://repo1.maven.org/maven2),
  atlassian-public (https://maven.atlassian.com/repository/public)



[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Steinar Bang
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 7, 2014

I found a solution/workaround:

  • cd to ~/atlassian-plugin-sdk/repository/jndi/jndi/
  • zip'ed up the 1.2.1 directory into 1.2.1.zip
  • cd to ~/atlassian-plugin-sdk/repository/jta/jta/
  • zip'ed up the 1.0.1 directory into 1.0.1.zip
  • cd to ~/.m2/repository/jndi/jndi/
  • deleted the 1.2.1 directory
  • unzipped the 1.2.1.zip to create a new 1.2.1 directory
  • cd to ~/.m2/repository/jta/jta/
  • deleted the 1.0.1 directory
  • unzipped the 1.0.1.zip to create a new 1.0.1.zip directory
  • opened eclipse and ran Maven->Update Project.. to make maven rebuild its dependencies

After this the errors went away. Presumably this would work for all maven builds missing these dependencies...?

0 votes
Steinar Bang
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 7, 2014

Did you ever find a solution for this issue?

I imported a mavenized groovy script project into eclipse with m2e and ended up missing these exact two artifacts.

Querying maven central for jta reveals these two possibilities:

  • jta:jta:jar:1.0.1b
  • javax.transaction:jta:jar:1.1

Querying maven central for jndi revealse this candidate:

  • javax.naming:jndi:jar:1.2.1

I tried downloading the javax.* artifacts manually, with the plan of "mvn install:install-file" those artifacts in the local repository, with a modified groupId.

However the javax.* weren't downloadable (jta:jta:jar:1.0.1b depended on javax.transaction:jta:jar:1.0.1B which wasn't downloadable from maven central) so that approach failed.

TAGS
AUG Leaders

Atlassian Community Events