使用REST与Java客户端通信Jira [英] Communicate Jira with java client using REST

查看:139
本文介绍了使用REST与Java客户端通信Jira的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在阅读有关Atlassian Jira的页面中的文档.

I have been reading the documentation that is in the page about Atlassian Jira.

我只想在Eclipse中创建一个类以使用Rest连接到Jira并获取问题的名称.

I want to simply create a class in Eclipse to connect to Jira using Rest and get the name of an issue.

我需要安装什么?我下载了此页面的一罐.

What do I need to install? I downloaded a jar of this page.

推荐答案

第一个解决方案

如果您使用的是Eclipse,那就简单了. 下载m2e插件(帮助->安装新软件->使用->"

First solution

If you are using Eclipse than it is simple. Download the m2e plugin (Help -> Install new software --> Work with --> "m2e plugin download link").

然后新建->项目...-> Maven项目 在pom.xml中添加:

Then New -> Project ... -> Maven Project In pom.xml add:

<dependencies>
...
    <dependency>
        <groupId>com.atlassian.jira</groupId>
        <artifactId>jira-rest-java-client</artifactId>
        <version>Version of the library you use</version>
    </dependency>
...
</dependencies>

并使用> https://studio.atlassian.com/wiki所需的内容/display/JRJC/Tutorial .

或者,如果您唯一需要获取问题名称,则可以向REST URL发出HttpRequest并解析返回的JSON. REST响应的样子: https://jira.atlassian.com /rest/api/latest/issue/JRA-9

Or, if your only need is to get the issues name then you can make an HttpRequest to the REST url and parse the returned JSON. How a REST response looks like: https://jira.atlassian.com/rest/api/latest/issue/JRA-9

请参阅: 如何在Java中发送HTTP请求?用Java解码JSON格式

这篇关于使用REST与Java客户端通信Jira的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆