Hi all,
I’m trying to update a JIRA 6 plugin to JIRA 7 using atlassian-spring-scanner, but I’m getting an unsatisfied dependency when I try to add the condition using UserIsProjectAdminCondition:
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.atlassian.jira.plugin.webfragment.conditions.UserIsProjectAdminCondition': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.jira.security.PermissionManager]: No qualifying bean of type [com.atlassian.jira.security.PermissionManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.jira.security.PermissionManager] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:185)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143)
In the atlassian-plugin.xml I added:
<condition class="com.atlassian.jira.plugin.webfragment.conditions.UserIsProjectAdminCondition"/>
In the pom.xml I used this import snippet (and other variants), but didn’t find a solution yet:
<Import-Package>
javax.ws.rs*;version="[1,2)",
javax.servlet*;version="2.5",
javax.xml.bind*;version="[2.1,3)",
*;version="0";resolution:=optional
</Import-Package>
What I want is to see the action only if the user is the admin of the current project.