Scriptrunner: How to include 3rd Party libraries

Adolfo Casari
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.
September 6, 2017

I am trying to use groovy-wslite to call webservices from postfunctions, but I always get "unable to resolve class SOAPClient", which means scriptrunner can't find/load that library. I put the library jar in WEB-INF/lib.

Is this supported? I have seen some posts about this same issue it seems this is not doable ( as of version 5.1.0 ).

Thanks in advance,

1 answer

1 accepted

0 votes
Answer accepted
Daniel Yelamos [Adaptavist]
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.
September 13, 2017

Hello Adolfo

This is not directly doable with SR out of the box. You need to upload a plugin of your own that uses that service, and then use the @WithPlugin.

We have a few tips on how to use the wrapping @WithPlugin here

Hope you found this helpful, do tell me if you need anymore help.

Cheers

Dyelamos

Adolfo Casari
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.
September 13, 2017

Thanks I will give it a try.

Adolfo Casari
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.
September 18, 2017

I am running into this error when enabling my plugin:

Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.casari.plugins.wslite [211]: Unable to resolve 211.0: missing requirement [211.0] osgi.wiring.package; (osgi.wiring.package=groovyjarjarasm.asm.tree.analysis)

Actually there is no groovyjarjarasm.asm.tree.analysis package in groovy-all-1.7.6.jar (only groovyjarjarasm.asm.tree).

Any ideas?

Daniel Yelamos [Adaptavist]
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.
September 19, 2017

As your exception reads, you are missing that package, which seems to be a dependency.

"Unable to resolve 211.0: missing requirement [211.0] osgi.wiring.package; "

How are you compiling the plugin? If you are packaging with maven or gradle, you might not be downloading the right dependencies.

Cheers

Dyelamos

Adolfo Casari
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.
September 19, 2017

I am using SDK to create the plugin. In pom.xml I have:

<dependency>
            <groupId>com.github.groovy-wslite</groupId>
            <artifactId>groovy-wslite</artifactId>
            <version>1.1.2</version>
            <scope>compile</scope>
  </dependency>

then atlas-package. The resulting jar is this:

https://drive.google.com/file/d/0B4KoylVU_5L_eGpSM2dzclYtWGs/view?usp=sharing

but when I try to enable it in JIRA, I get that error.

Thanks for your help.

Adolfo Casari
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.
September 19, 2017

I figure it out.

The solution was in this post:

https://community.atlassian.com/t5/Answers-Developer-Questions/How-to-fix-quot-Unresolved-constraint-in-bundle-quot-problems/qaq-p/540137

Now I am able to use the 3rd party library using @WithPlugin.

Thanks.

Daniel Yelamos [Adaptavist]
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.
September 20, 2017

You are welcome Adolfo.

If you could kindly mark my answer as accepted, that would let people know that this answer is closed.

Do let me know if I can help you further.

Cheers

Dyelamos

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events