Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Provide dependency from lib/ directory

Igor Loskutov
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.
July 1, 2012

Hi! I want include XStream library in my plugin.
I don't want use <scope>compile</scope> because I see that Jira include this library (xstream-1.3.1.jar) in WEB-INF/lib folder. But when I write something like that :

&lt;dependency&gt;
            &lt;groupId&gt;xstream&lt;/groupId&gt;
            &lt;artifactId&gt;xstream&lt;/artifactId&gt;
            &lt;version&gt;1.2.2&lt;/version&gt;
            &lt;scope&gt;provided&lt;/scope&gt;
        &lt;/dependency&gt;

it just don't work, plugin can't find and load xstream classes in runtime.

How to resolve this issue?

1 answer

1 accepted

1 vote
Answer accepted
Jobin Kuruvilla [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.
July 1, 2012

Jar files under WEB-INF/lib are not available to OSGI plugins. They have a class path or their own and hence you need to give the scope as compile. There is no other option here.

Well, the only other option is to create a v1 plugin. That will work but will take away all the advantages of v2 plugins away, like dynamic deployment.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events