Парни, привет!
Совсем отчаялся, не получается ни в какую добавить third party зависимость в свой плагин.
<dependency>
<groupId>org.apache.directory.api</groupId>
<artifactId>api-all</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
При попытке создать объект класса из этой библиотеки получаю при деплое плагина портянку эксепшенов, основной посыл в которой:
com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin ….
…
Caused by: org.osgi.framework.BundleException: Unable to resolve com.example.jira.tfa.2FAPlugin [289](R 289.0): missing requirement [com.example.jira.tfa.2FAPlugin [289](R 289.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.directory.api.ldap.model.cursor) Unresolved requirements: [[com.example.jira.tfa.2FAPlugin [289](R 289.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.directory.api.ldap.model.cursor)]
пробовал добавить все используемые пакеты в секции <Import-Package> файла pom.xml, типа:
<Import-Package>
org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional",
org.apache.directory.api.ldap.model.*;resolution:="optional",
org.apache.directory.api.ldap.model.exception.*;resolution:="optional",
org.apache.directory.ldap.client.api.*;resolution:="optional",
*
</Import-Package>
Но тогда при деплое плагина валятся эксепшены вида:
Unable to create application context for [com.example.jira.tfa.2FAPlugin], unsatisfied dependencies: none
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authenticator': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.example.jira.access.auth.Authenticator] from ClassLoader [com.example.jira.tfa.2FAPlugin [290]]
……..
Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.example.jira.access.auth.Authenticator] from ClassLoader [com.example.jira.tfa.2FAPlugin [290]]
……
Caused by: java.lang.ClassNotFoundException: org.apache.directory.api.ldap.model.exception.LdapException not found by com.example.jira.tfa.2FAPlugin [290]
Подскажите, плиз, куда копать?