Writing Java client for REST API
In this recipe, we will quickly see how we can create a Java client to communicate with JIRA using the REST APIs.
Getting ready
Create a simple Java project. You can use the maven archetype, maven-archetype-quickstart
, to create the project or use your favorite IDE to generate one.
The following is the non-interactive command for generating a simple project using maven-archetype-quickstart:
mvnarchetype:generate -DgroupId=com.jtricks
-DartifactId=rest-client -DarchetypeArtifactId=maven-archetype-quickstart
-DinteractiveMode=false
You can easily generate an Eclipse project using the following command:
mvn eclipse:eclipse
How to do it...
In order to connect to JIRA using REST APIs, Atlassian has developed the JRJC ...
Get JIRA Development Cookbook - Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.