Unable to resolve missing requirement osgi.wiring.package

Hi Community,

I am getting stared with Addon-Development and am currently stuck with a dependency error:
In IntelliJ IDEA there is no error message and the plugin compiles without any error.

When starting the project with atlas-run, I am seeing the following exception:

INFO] [talledLocalContainer]     ********************************************************************************************************************************************************************************************************
[INFO] [talledLocalContainer]     ___ FAILED PLUGIN REPORT _____________________
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]     2 plugins failed to load during JIRA startup.
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]           'de.t2consult.atlassian.recyclebin-tests' - 'recyclebin'  failed to load.
[INFO] [talledLocalContainer]                   Cannot start plugin: de.t2consult.atlassian.recyclebin-tests
[INFO] [talledLocalContainer]                           Unresolved constraint in bundle de.t2consult.atlassian.recyclebin-tests [172]: Unable to resolve 172.0: missing requirement [172.0] osgi.wiring.package; (osgi.wiring.package=de.t2consult.atlassian.recyclebin.api) [caused by: Unable to resolve 171.0: missing requirement [171.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.inject)]
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]                   It was loaded from c:\DEV\ATLAS\jira-recycle-bin\recyclebin\target\jira\home\plugins\installed-plugins\recyclebin-1.0.0-SNAPSHOT-tests.jar
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]           'de.t2consult.atlassian.recyclebin' - 'recyclebin'  failed to load.
[INFO] [talledLocalContainer]                   Cannot start plugin: de.t2consult.atlassian.recyclebin
[INFO] [talledLocalContainer]                           Unresolved constraint in bundle de.t2consult.atlassian.recyclebin [171]: Unable to resolve 171.0: missing requirement [171.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.inject)
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]                   It was loaded from c:\DEV\ATLAS\jira-recycle-bin\recyclebin\target\jira\home\plugins\installed-plugins\recyclebin-1.0.0-SNAPSHOT.jar
[INFO] [talledLocalContainer]
[INFO] [talledLocalContainer]     ********************************************************************************************************************************************************************************************************
[INFO] [talledLocalContainer]

What I have tried so far is:
atlas-clean, checking the -instruction in the pom.xml, which is as follows:

<Import-Package>org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", *</Import-Package>

Any hints what else might be wrong?

Best regards,
Tobias

Check your @ComponentImport statements- somewhere in there you’re importing your own api inside the app. If you remove the annotation for that then you should be good.

Hi Daniel,

thank you for the hint.
I have checked my @ComponentImports and they seem to be correct…

Best regards,
Tobias

Hi Daniel,

to give you and other readers more details on the issue.
I was creating the project initially with atlas-create-jira-plugin.

After this - I was seeing the following errors in the console when trying to build the project:

java: package com.atlassian.sal.api does not exist
java cannot find symbol class ApplicationProperties

By using the red “idea”-icon - I manually added some Maven dependencies
image

This fixed the issue not being able to build the project in IntelliJ.
BUT - it also lead to the AddOn not being able to load with atlas-run afterwards…

I have now setup the IDE as you described here:

Configuring the maven from the standard to the Atlassian one finally did the trick!

Building and running the AddOn perfectly now!

Best regards,
Tobias

1 Like