I'm trying use two my plugins together, first one as component library for second one.
I have these atlassian-plugin.xml descriptors :
For first one : <component key="my-permission-group-manager" name="My Permission Group Manager" class="ru.my.jira.plugins.permission.manager.ao.impl.MegaPermissionGroupManagerImpl"/>
for second one : <component-import key="my-permission-manager-import" name="Permission Manager service" interface="ru.my.jira.plugins.permission.manager.ao.MegaPermissionGroupManager"></component-import>
In second one plugin I have these dependencies in pom.xml file :
<dependency> <groupId>ru.megaplan.jira.plugins</groupId> <artifactId>megaplan-permission-manager</artifactId> <version>1.0-SNAPSHOT</version> <scope>provided</scope> </dependency>
And maven-jira-plugin configuration like this :
<build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${jira.version}</productVersion> <productDataVersion>${jira.version}</productDataVersion> <jvmArgs>-Dfile.encoding=UTF-8</jvmArgs> <pluginArtifacts> <pluginArtifact> <groupId>ru.my.jira.plugins</groupId> <artifactId>my-permission-manager</artifactId> <version>1.0-SNAPSHOT</version> </pluginArtifact> </pluginArtifacts> </configuration> </plugin> </plugins> </build>
In both cases I use same 1.6 java compiler version configured in pom.xml's like this :
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin>
Using Igor Sereda's generous advice in https://answers.atlassian.com/questions/17543/run-multiple-plugins-with-atlas-run I ran first atlas-package and mvn install for first plugin secondly atlas-package and mvn install for second plugin.
After that I use atlas-run in second plugin directory and obtain working jira-develop instance with my first plugin but not second.
In console I have this message :
[plugin.osgi.factory.OsgiPlugin] Detected an error (BundleException) enabling the plugin 'ru.my.jira.plugin.secondplugin' : Unresolved constraint in bundle ru.my.jira.plugin.secondplugin [95]: Unable to resolve 95.0: missing requirement [95.0] package; (package=ru.megaplan.plugins.jira.permission.manager.ao). 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 http://confluence.atlassian.com/x/1xy6D
I tried clean my local maven packages, remove <dependency> blocks from second pom.xml, change mvn install to atlas-mvn intall, but in not work.
Debug logging level in log4j does not provide any additional information.
I very appreciate any help that can lead me right path in this issue.
Community moderators have prevented the ability to post new answers.
Nope, I just forgot use "public" in <component/> descriptor.
Fine solution looks like this :
<component key="my-permission-group-manager" name="My Permission Group Manager" class="ru.my.jira.plugins.permission.manager.ao.impl.MegaPermissionGroupManagerImpl" public="true"> <interface>ru.my.jira.plugins.permission.manager.ao.MegaPermissionManager</interface> </component>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.