jira maven依赖配置出现错误:setNeverCache1_0ResponsesWithQueryString(Z)V、HttpAsyncClient.start()V、..util/Args
最近jira用java二次开发各种坑,主要是jar包依赖,版本死活不对,最后才发现全部都要使用atlassian定制的jar包才行。
这里记录下,希望能帮助需要的小伙伴儿们减少填坑。
相关错误
一、java.lang.NoSuchMethodError: org.apache.http.impl.client.cache.CacheConfig.setNeverCache1_0ResponsesWithQueryString(Z)V
二、Exception in thread "main" java.util.concurrent
三、ClassNotFoundException: org.apache.http.nio.client.HttpAsyncClient.start()V
四、java.lang.NoClassDefFoundError: org/apache/http/util/Args
下面是正确配置:
<!-- https://mvnrepository.com/artifact/com.atlassian.jira/jira-rest-java-client -->
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client</artifactId>
<version>2.0.0-m2</version>
</dependency>
<dependency>
<groupId>com.atlassian.util.concurrent</groupId>
<artifactId>atlassian-util-concurrent</artifactId>
<version>3.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.sharegov/mjson -->
<dependency>
<groupId>org.sharegov</groupId>
<artifactId>mjson</artifactId>
<version>1.4.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.2.1-atlassian-2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.2.2-atlassian1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore-nio -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore-nio</artifactId>
<version>4.2.2-atlassian1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient-cache -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
<version>4.2.1-atlassian-2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpasyncclient -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpasyncclient</artifactId>
<version>4.0-beta3-atlassian2</version>
</dependency>