Jira 无法在 java 中找到任何与通过 restAPI 登录匹配的导入
Jira unable to find any import for which would match for login via restAPI in java
我想通过 rest java 客户端和显示问题创建简单的 JIRA 登录。我遵循了 Atlassian 网站上的教程。
我的 java :
import com.atlassian.jira.testkit.client.restclient.Issue;
public class UniRest {
public static void main(String[] args) {
final AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
final JiraRestClient restClient = factory.createWithBasicHttpAuthentication("http://vle.atlassian.com", "admin", "admin");
try {
final Issue issue = restClient.getIssueClient().getIssue("TST-7").claim();
System.out.println(issue);
}
finally {
// cleanup the restClient
restClient.close();
}
}
}
我的 pom.xml :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.plugins.tutorial</groupId>
<artifactId>UniRestTest</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client</artifactId>
<version>2.0.0-m19</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>2.0.0-m8</version>
</dependency>
</dependencies>
</project>
我正在寻找一个 aswear 或修复几个小时。实在找不到。很明显我做错了什么或者我错过了某处。你能帮我解决这个问题吗?
问题是我找不到 JiraRestClient
和 AsynchronousJiraRestClientFactory
的任何导入来解决我的问题。
我得到的错误是:
Error:(6, 15) java: cannot find symbol symbol: class
AsynchronousJiraRestClientFactory location: class UniRest
您可以从 atlassian 论坛尝试这个答案:https://answers.atlassian.com/questions/24291459/cannot-create-asynchronousjirarestclientfactory
我想通过 rest java 客户端和显示问题创建简单的 JIRA 登录。我遵循了 Atlassian 网站上的教程。
我的 java :
import com.atlassian.jira.testkit.client.restclient.Issue;
public class UniRest {
public static void main(String[] args) {
final AsynchronousJiraRestClientFactory factory = new AsynchronousJiraRestClientFactory();
final JiraRestClient restClient = factory.createWithBasicHttpAuthentication("http://vle.atlassian.com", "admin", "admin");
try {
final Issue issue = restClient.getIssueClient().getIssue("TST-7").claim();
System.out.println(issue);
}
finally {
// cleanup the restClient
restClient.close();
}
}
}
我的 pom.xml :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example.plugins.tutorial</groupId>
<artifactId>UniRestTest</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client</artifactId>
<version>2.0.0-m19</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>2.0.0-m8</version>
</dependency>
</dependencies>
</project>
我正在寻找一个 aswear 或修复几个小时。实在找不到。很明显我做错了什么或者我错过了某处。你能帮我解决这个问题吗?
问题是我找不到 JiraRestClient
和 AsynchronousJiraRestClientFactory
的任何导入来解决我的问题。
我得到的错误是:
Error:(6, 15) java: cannot find symbol symbol: class AsynchronousJiraRestClientFactory location: class UniRest
您可以从 atlassian 论坛尝试这个答案:https://answers.atlassian.com/questions/24291459/cannot-create-asynchronousjirarestclientfactory