I'm new with JIRA plugin development, so my question might sound too easy, but please be patient and read it carefully, because I've tried so many things, found on the internet, and none of them worked. That's why I'm asking it here, as my last hope.
I would like to use JIRA REST Java Client in my JIRA plugin. The straight forward instructions suggest to add the following into my pom.xml and everything should work:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client</artifactId>
<version>1.1-m02</version>
</dependency>
but of course, it doesn't, because in Eclipse, everything shows fine (without any errors/warnings) after atlas-mvn eclipse:eclipse
, but when I run JIRA with atlas-run
or atlas-debug
, as soon as I try to access the line:
JerseyJiraRestClientFactory f = new JerseyJiraRestClientFactory();
I get the exception java.lang.NoClassDefFoundError: com/atlassian/jira/rest/client/internal/jersey/JerseyJiraRestClientFactory
I repeat, in Eclipse, everything shows ok, without a single warning/error mark, but at runtime, I get that exception.
The solution that was recommended to me was to add all the needed dependencies into my pom.xml which I did, but then I wasn't able to even start JIRA normally, due to so many exceptions (will provide them if needed).
So, simple question is how to do this properly? Even better, does anyone have any simple WORKING example of the pom.xml file + src/ folder to provide, so I can figure out where am I mistaking?
Thanks so much in advance.