JSD 4 - Plugin won't load due to OSGi Error

I’ve been trying for a while now to get our plugin to work with JSD4. In our plugin we implement three automation then actions and it will not load due to OSGi issues resolving ‘osgi.wiring.package=com.atlassian.servicedesk.plugins.automation.api’

ERROR [plugin.osgi.factory.OsgiPlugin ] Detected an error (BundleException) enabling the plugin 'com.sapling.elevator' : Unable to resolve com.sapling.elevator [246](R 246.0): missing requirement [com.sapling.elevator [246](R 246.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.servicedesk.plugins.automation.api) Unresolved requirements: [[com.sapling.elevator [246](R 246.0)] osgi.wiring.package; (osgi.wiring.package=com.atlassian.servicedesk.plugins.automation.api)]. This error usually occurs when your plugin imports a package from another bundle with a specific version constraint and either the bundle providing that package doesn't meet those version constraints, or there is no bundle available that provides the specified package. For more details on how to fix this, see https://developer.atlassian.com/x/mQAN

When running under JSD 3 if I look at the OSGI browser I can see that the Service Desk Automation Plugin exports a number of packages which our plugin successfully imports, eg com.atlassian.servicedesk.plugins.automation.api.configuration.ruleset and com.atlassian.servicedesk.plugins.automation.api.configuration.ruleset.validation

Now if I look at the OSGi browser for JSD4 these appear to have moved to new package names com.atlassian.servicedesk.api.automation.configuration.ruleset and com.atlassian.servicedesk.api.automation.configuration.ruleset.validation

Any suggestions?

Hi Keith,

Did you manage to solve the issue ?
I too have a similar error

osgi.wiring.package; (osgi.wiring.package=com.atlassian.servicedesk.api)]


Atlassian changed the name of the maven artefact with 4.0 from servicedesk-automation-api to jira-servicedesk-automation-api however it looks like this was done half way through the 4.0 build so there are still some published artifacts of servicedesk-automation-api with version 4 that you can reference but don’t work

See Bitbucket for changes needed in pom

Thanks Keith. Managed to fix it with your recommendation.