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
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,342 views 13 19
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