Reputation: 31
I am trying to create a JiraRestClient using Basic authentication.
JiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
URI jiraServerUri = new URI("*");
try (JiraRestClient restClient = factory.createWithBasicHttpAuthentication(jiraServerUri, username, password)) {
App.restClient = restClient;
final Issue issue = getIssue("DEV-1");
System.out.println(issue.getDescription());
However, I am getting the below exception:
Exception in thread "main" java.lang.NoClassDefFoundError: io/atlassian/fugue/Suppliers
at com.atlassian.httpclient.apache.httpcomponents.ApacheAsyncHttpClient.<clinit>(ApacheAsyncHttpClient.java:80)
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.doCreate(DefaultHttpClientFactory.java:61)
at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClientFactory.create(DefaultHttpClientFactory.java:36)
at ...
Process finished with exit code 1
I think something is missing or wrong. But not sure which one...
Here is the snippet from my pom:
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>5.2.0</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-api</artifactId>
<version>5.2.4</version>
</dependency>
<dependency>
<groupId>io.atlassian.fugue</groupId>
<artifactId>fugue</artifactId>
<version>4.7.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.13</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>org.example</groupId>
<artifactId>JiraIntegratorLibrary</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
What am I missing here?
Upvotes: 2
Views: 184