I'm trying to import "Yet Another Commit Checker" plugin v1.24, as follows in my POM:
<!-- in project dependencies -->
<dependency>
<groupId>com.isroot.stash.plugin</groupId>
<artifactId>yacc</artifactId>
<version>1.24</version>
</dependency>
<!-- in bitbucket-maven-plugin configuration-->
<Import-Package>*, com.isroot.stash.plugin, com.isroot.stash.plugin.jira</Import-Package>
However that plugin declares its spring components as follows:
<component key="jiraService" class="com.isroot.stash.plugin.jira.JiraServiceImpl" public="true">
<interface>com.isroot.stash.plugin.JiraService</interface>
</component>
And so my plugin log is telling me it can't find the package:
[INFO] 2019-06-02 22:36:35,022 ERROR [QuickReload - Plugin Installer] c.a.plugin.osgi.factory.OsgiPlugin Detected an error (BundleException) enabling the plugin 'com.amyn.bitbucket.plugin.fix.version.fix-version-plugin' : Unresolved constraint in bundle com.amyn.bitbucket.plugin.fix.version.fix-version-plugin [149]: Unable to resolve 149.0: missing requirement [149.0] osgi.wiring.package; (&(osgi.wiring.package=com.isroot.stash.plugin)). 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
Nothing in https://bitbucket.org/atlassian/atlassian-spring-scanner/src/master/ says that you can't import packages from maven dependencies that export their components the old way, i.e with <component> declarations. Any idea what I could be doing wrong here?
I tried adding a version=0 clause in the <Import-Package> instruction, but that didn't help.
Thanks,
EDIT: This seems to be the same question as https://community.atlassian.com/t5/Answers-Developer-Questions/Import-Package-of-plugin-bundled-jar-leads-to-org-osgi-framework/qaq-p/508683 -- but then my question would be how to import those dependencies?
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.