How to use jira-api dependency?

I am using JIRA 7.1.6 and I want to use the IssueEvent class in my Java application. It seems as if I have to use the jira-api dependency in my POM but when I run a build it always fails with an exception:

[ERROR] Failed to execute goal on project myproject: Could not resolve dependencies for project xx.abcde:myproject:jar:0.0.1-SNAPSHOT: Could not find artifact jta:jta:jar:1.0.1 in Central Repository (http://central.maven.org/maven2/) -> [Help 1]

Here is my repository section of the POM:

 <repositories>
<!-- <repository>
<id>Attlassian-Maven-Legacy</id>
<url>https://packages.atlassian.com/maven-closedsource-legacy/</url>
</repository> -->
<repository>
<id>Central Repository</id>
<url>http://central.maven.org/maven2/</url>
</repository>
<repository>
<id>Attlassian-Maven-External</id>
<url>https://packages.atlassian.com/maven-hosted-atlas-external/</url>
</repository>
<repository>
<id>Attlassian-Maven</id>
<url>https://packages.atlassian.com/maven/</url>
</repository>
<repository>
<id>Attlassian</id>
<url>https://maven.atlassian.com/content/repositories/atlassian-public/</url>
</repository>
<repository>
<id>Attlassian-3d-Party</id>
<url>https://maven.atlassian.com/3rdparty/</url>
</repository>
</repositories>

 

Even when I try to include the JTA dependency manually: 

 <dependency> 
<groupId>jta</groupId>
<artifactId>jta</artifactId>
<version>1.0.1</version>
</dependency>

...it doesn't help.

Using https://maven.atlassian.com/webapp/#/artifacts/browse/tree/General/maven-closedsource-legacy/com/atlassian/jira/jira-api/7.1.6/jira-api-7.1.6.jar shows us, that the dependency exists and I can find IssueEvent in the JAR.

So my question is: How can I achieve it using jira-api to finally use the IssueEvent class?

1 answer

I found out that I have to exclude the JTA dependency used internally in jira-api:

 <dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>jta</groupId>
<artifactId>jta</artifactId>
</exclusion>
</exclusions>
</dependency>

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

66 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you