Cannot run project using atlassian sdk plugin

Hello, everyone!

I’m new in confluence development and need a help.

I use atlassian sdk plugin ver. 6.2.14 (os: ubuntu 14.04) for creation sample plugin for confluence.

I created the plugin sample, builded it (using atlas-mvm command) and run (atlas-run). But the plugin failed. The error is:


[INFO] [talledLocalContainer] Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.atlassian.confluence.samle.confluence-sample-plugin [230]: Unable to resolve 230.0: missing requirement [230.0] osgi.wiring.package; (osgi.wiring.package=org.springframework.ldap.core)


Thanks, Olga

This occurs when you are properly declaring your component imports. Can you show us your code and plugin descriptor?

Post your pom.xml. Most likely you either didn’t add the dependency in the correct scope or miss to import * or package mentioned

My pom.xml configuration is:

<plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-confluence-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${confluence.version}</productVersion>
                    <productDataVersion>${confluence.data.version}</productDataVersion>
                    <enableQuickReload>true</enableQuickReload>
                    <enableFastdev>true</enableFastdev>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Export-Package>com.atlassian.confluence.samle.api,</Export-Package>
                        <Import-Package>
                            org.springframework.osgi.*;resolution:="optional",
                            org.eclipse.gemini.blueprint.*;resolution:="optional",
                            *
                        </Import-Package>
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
...

<repositories>
        <repository>
            <id>Atlassian repository</id>
            <url>https://maven.atlassian.com/repository/public/</url>
        </repository>
    </repositories>

    <properties>
        <confluence.version>6.3.0</confluence.version>
        <confluence.data.version>6.3.0</confluence.data.version>
        <amps.version>6.2.11</amps.version>
        <plugin.testrunner.version>1.2.3</plugin.testrunner.version>
        <atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
        <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
    </properties>

I tried to add a dependency for org.springframework.ldap.core, but the build failed: “caused by: Unable to resolve 230.0: missing requirement [230.0] osgi.wiring.package; (osgi.wiring.package=com.ibm.wsspi.uow)” and etc. Maybe I have a problem with jar versions.

Are you properly using the @ComponentImport and related annotations?

I’ll try to delete org.springframework.ldap dependencies and find another way to working with ldap.

Thanks a lot!