I'm trying to use Jira Rest Client with an existing Jersey project. But it is causing dependency conflicts.
pom.xml:
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.24.1</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>2.0.0-m30</version>
</dependency>
The above dependencies result in the exception:
root cause: java.lang.NoSuchMethodError: javax.ws.rs.core.Application.getProperties()Ljava/util/Map;
If I exclude com.sun.jersey:jersey-client
the former error does go away.
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client</artifactId>
<version>1.2-m01</version>
<exclusions>
<exclusion>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
</exclusion>
</exclusions>
</dependency>
But then it cause in another exception.
org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: com/atlassian/fugue/Effect
Is there any workaround for me to get Jira client work along with Jersey 2?
There are two dependencies to exclude from atlassian jira rest client:
The other issue you gotten can be solved by adding this dependency: