Hello I have tried to import a third-party library into osgi framework (jira-plugin server) as I read here on the forum and from atlas tutorials:
My pom:
<!-- Third party lib, must be with compile -->
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.9.1</version>
<scope>compile</scope> <!-- important! -->
</dependency>
My import package:
<!-- Add package import here -->
<Import-Package>org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", org.jsoup.*;version="1.9.1", *</Import-Package>
Still, I got this exception:
2019-11-26 10:21:04,766 QuickReload - Plugin Installer ERROR [c.a.p.osgi.factory.OsgiPlugin] Detected an error (BundleException) enabling the plugin ‘com.erstegroup.jira.plugin.andisScraper-tests’ : Unresolved constraint in bundle com.erstegroup.jira.plugin.andisScraper-tests [230]: Unable to resolve 230.0: missing requirement [230.0] osgi.wiring.package; (osgi.wiring.package=com.erstegroup.jira.plugin.andisSync.api) [caused by: Unable to resolve 229.0: missing requirement [229.0] osgi.wiring.package; (&(osgi.wiring.package=org.jsoup)(version>=1.9.1))]. 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 https://developer.atlassian.com/x/mQAN