Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Plugin dependency unresolved constraint

Igor Loskutov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2012

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.

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

4 votes
Answer accepted
Igor Loskutov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2012

Nope, I just forgot use "public" in <component/> descriptor.

Fine solution looks like this :

&lt;component key="my-permission-group-manager"
       name="My Permission Group Manager"       class="ru.my.jira.plugins.permission.manager.ao.impl.MegaPermissionGroupManagerImpl"
public="true"&gt;
&lt;interface&gt;ru.my.jira.plugins.permission.manager.ao.MegaPermissionManager&lt;/interface&gt;
&lt;/component&gt;

TAGS
AUG Leaders

Atlassian Community Events