Ok so the documentation around this seems off but this got it to work for me:
-
Ignore this page which says it’s deprecated:
Component Import module (atlassian.com) -
Follow this:
UnsatisfiedDependencyException - error creating bean with name (atlassian.com)
Where it says to import component in atlassian-pugin.xml
<atlassian-plugin ... >
...
<component-import key="userManager" interface="com.atlassian.sal.api.user.UserManager"/>
<component-import key="contentPropertyService" interface="com.atlassian.confluence.api.service.content.ContentPropertyService"/>
<component-import key="loginUriProvider" interface="com.atlassian.sal.api.auth.LoginUriProvider"/>
<component-import key="templateRenderer" interface="com.atlassian.templaterenderer.TemplateRenderer"/>
- Comment out or remove below from the pom.xml file:
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<!-- Add package to export here -->
<Export-Package>
se.ltu.confluence.plugin.api,
</Export-Package>
<!-- Add package import here -->
<Import-Package>
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
com.atlassian.sal.api.*;resolution:="optional",
*
</Import-Package>
<!-- Ensure plugin is spring powered -->
<Spring-Context>*</Spring-Context>
</instructions>