如何使用JIRA REST客户端库? [英] How to use JIRA REST client library?
问题描述
我需要使用JIRA REST客户端版本5.2.0或更高版本. Cloud JIRA不适用于早期版本的客户端.
在我的pom.xml
文件中,我具有以下依赖性:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>5.2.1</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-app</artifactId>
<version>5.2.1</version>
</dependency>
在构建项目时,出现如下异常:
Failed to execute goal on project XXXXXXXXX: Could not resolve dependencies for project XXXXXXXXXX:jar:XXXX: Failed to collect dependencies at com.atlassian.jira:jira-rest-java-client-core:jar:5.2.1: Failed to read artifact descriptor for com.atlassian.jira:jira-rest-java-client-core:jar:5.2.1: Could not find artifact com.atlassian.platform:platform:pom:3.1.7 in MY_REPO (http://XXXXXXXXXX/repository/maven-public) -
com.atlassian.platform:platform:pom:3.1.7
未在 mvnrepository 中列出.有版本3.1.12
和3.1.17
,但没有版本3.1.7
.有人告诉我3.1.7
版本可能存在与安全相关的错误,因此被Atlassian删除.
jira-rest-java-client-app
和jira-rest-java-client-core
都是使用平台的3.1.7
版本:
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-parent</artifactId>
<version>5.2.1</version>
<packaging>pom</packaging>
[...]
<properties>
<platform.version>3.1.7</platform.version>
[...]
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.atlassian.platform</groupId>
<artifactId>platform</artifactId>
<version>${platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
5.2.1
似乎是 jira-rest-java-client-core 和解决方案
如果您查看存储库
https://packages.atlassian.com/mvn/maven-external
com.atlassian.platform:platform:pom:3.1.7
所需的工件.由于该存储库似乎来自Atlassian,因此我没有理由相信他们建议不要使用该版本.
这也在mvnrepository. There are versions 3.1.12
and 3.1.17
, but not 3.1.7
. Someone told me that version 3.1.7
might have had a security-related bug and was therefore removed by Atlassian.
Both jira-rest-java-client-app
and jira-rest-java-client-core
are children of jira-rest-java-client-parent, which uses version 3.1.7
of the platform:
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-parent</artifactId>
<version>5.2.1</version>
<packaging>pom</packaging>
[...]
<properties>
<platform.version>3.1.7</platform.version>
[...]
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.atlassian.platform</groupId>
<artifactId>platform</artifactId>
<version>${platform.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
5.2.1
seems to be the latest version of both jira-rest-java-client-core and jira-rest-java-client-app.
How can I use the JIRA REST client (for programmatically creating issues in Cloud JIRA) when it uses a version of the library that is not available any more?
I tried to exclude the platform in the dependencies and to specify another version in depencency management sections. This did not help.
If you have a look at the repository
https://packages.atlassian.com/mvn/maven-external
from atlassian, you find the desired artifact com.atlassian.platform:platform:pom:3.1.7
there. Since this repository seems to be from atlassian, I see no reason to believe that they recommend not to use the version.
This is also discussed in https://community.atlassian.com/t5/Jira-questions/Jira-rest-java-client-core-5-1-and-fugue-2-7-0-breaks-build/qaq-p/1151091
这篇关于如何使用JIRA REST客户端库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!