Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can i use a REST client in jira 7.2.2 to contact external service with jersey?

huntermike October 29, 2017

i want to contact an external web service with jersey in my custom jira plugin.

 

But jersey is not working:

 

<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.8</version>
<scope>provided</scope>
</dependency>

 

The plugin will not start after adding this?

Any solutions?

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 29, 2017

Try this version

1.8-atlassian-11
huntermike October 29, 2017

it also wont work

i want to execute this code:

 Client client =ClientBuilder.newClient();
WebTarget webTarget
= client.target("http://localhost:8079/project/webapi/myresource");
Invocation.Builder invocationBuilder
= webTarget.request();


Response response
= invocationBuilder.get();

 

But i cant import the packages in eclipse.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 29, 2017

Do you use maven from atlassian sdk in eclipse? 

huntermike October 31, 2017

it worked with 

1.8-atlassian-11 

 I've just cleanded everything and rebuild it and than it worked.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 31, 2017

Nice to hear. Thank you for feedback.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events