Packaging Jira Plugin - osgi.wiring.package and NoClassDefFound errors


I started to create a plugin where the objective is to connect with the SSO company, using SAML. I create the code to make the SAML request, but I have some troubles to install the plugin due to packaging.

I’m using this artifact


and, at first attempt, I get some issues related with osgi.wiring.package. Putting the the following line in the pom.xml file the error disappear on installation


Now, I have an error at runtime, related with NoClassfound

Anyone can help with this kind of packaging errors? Some explanation?
I read some atlassian tutorials, but I’m not understanding where should I specify the dependency.


You have the maven dep marked as provided. But from what I know that package is not exported by the jira container… So why do you have the dependency marked as provided?

If I remove the scope provided, the plugin is not installed with the error
Unable to resolve 238.0: missing requirement [238.0] osgi.wiring.package; (osgi.wiring.package=bsh)
Or a very similar error specifying another artifact


If you set it to ‘Provided’ of course it installs then throws NoClassDefFound. You’re telling it Jira will provide it and Jira doesn’t have it. So when you try to use it, it blows up.

I’m telling you scope provided will not work since Jira doesn’t export that class. You need to determine if you have a compile time or runtime scope and work out issues with those methods instead of trying to get provided to work.

Yes. I know that provided will not work, but compile does not work too. When the scope is compile the plugin doesn’t install with the error


My doubt here is, how can I identify the necessary jar files to include into the plugin, without a conflict with the Jira provided files.