Hello,
I'm very new to Jira Plugin development.
I will create a plugin2 for Jira Server v.7.1.9 (Jira Software)
I want to use the Plugin Fiesta (Documentation) inside my plugin.
I've installed the plugin to my local maven repo using
mvn install:install-file -Dfile=<local-path-to-downloaded-file> -DgroupId=com.deiser.jira -DartifactId=fiesta -Dversion=1.4.1 -Dpackaging=jar
in my pom file I added the following dependency
<dependencies>
...
<dependency>
<groupId>com.deiser.jira</groupId>
<artifactId>fiesta</artifactId>
<version>1.4.1</version>
<scope>compile</scope>
</dependency>
</dependencies>
and
<Import-Package>org.springframework.osgi.*;resolution:="optional", org.eclipse.gemini.blueprint.*;resolution:="optional", com.deiser.jira.fiesta.api.*;resolution:="optional", *</Import-Package>
when I run the command: atlas-mvn package
I get the following in my altas-run cmd window:
[INFO] [talledLocalContainer] 2018-03-12 15:47:27,789 QuickReload - Plugin Installer ERROR [c.a.p.osgi.factory.OsgiPluginInstalledHelper] Cannot determine required plugins, cannot resolve bundle 'com.mycompany.jira.plugins.myapp'
[INFO] [talledLocalContainer] 2018-03-12 15:47:27,793 QuickReload - Plugin Installer ERROR [c.a.p.osgi.factory.OsgiPlugin] Detected an error (BundleException) enabling the plugin 'com.mycompany.jira.plugins.myapp' : Unresolved constraint in bundle com.mycompany.jira.plugins.myapp [216]: Unable to resolve 216.0: missing requirement [216.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.upm.license.storage.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
[INFO] [talledLocalContainer] 2018-03-12 15:47:27,793 QuickReload - Plugin Installer WARN [c.a.plugin.impl.AbstractPlugin] Unable to enable plugin 'com.mycompany.jira.plugins.myapp'
[INFO] [talledLocalContainer] 2018-03-12 15:47:27,793 QuickReload - Plugin Installer WARN [c.a.plugin.impl.AbstractPlugin] Because of this exception
[INFO] [talledLocalContainer] com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: com.mycompany.jira.plugins.myapp
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:419)
[INFO] [talledLocalContainer] at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:286)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.PluginEnabler.actualEnable(PluginEnabler.java:130)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java:107)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.enableDependentPlugins(DefaultPluginManager.java:1212)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultPluginManager.java:1188)
[INFO] [talledLocalContainer] at com.atlassian.jira.plugin.JiraPluginManager.addPlugins(JiraPluginManager.java:150)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.scanForNewPlugins(DefaultPluginManager.java:903)
[INFO] [talledLocalContainer] at com.atlassian.plugin.manager.DefaultPluginManager.installPlugins(DefaultPluginManager.java:821)
[INFO] [talledLocalContainer] at com.atlassian.jira.plugin.JiraPluginManager.installPlugins(JiraPluginManager.java:168)
[INFO] [talledLocalContainer] ... 2 filtered
[INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] [talledLocalContainer] at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
[INFO] [talledLocalContainer] at com.sun.proxy.$Proxy460.installPlugins(Unknown Source)
[INFO] [talledLocalContainer] ... 2 filtered
[INFO] [talledLocalContainer] at java.lang.reflect.Method.invoke(Method.java:498)
[INFO] [talledLocalContainer] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
[INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
[INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
[INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
[INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
[INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
[INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
[INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
[INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
[INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
[INFO] [talledLocalContainer] at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
[INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
[INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
[INFO] [talledLocalContainer] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
[INFO] [talledLocalContainer] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
[INFO] [talledLocalContainer] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
[INFO] [talledLocalContainer] at com.sun.proxy.$Proxy1117.installPlugins(Unknown Source)
[INFO] [talledLocalContainer] at com.atlassian.labs.plugins.quickreload.install.PluginInstallerMechanic.installPluginImmediately(PluginInstallerMechanic.java:185)
[INFO] [talledLocalContainer] at com.atlassian.labs.plugins.quickreload.install.PluginInstaller.installPluginImmediately(PluginInstaller.java:318)
[INFO] [talledLocalContainer] at com.atlassian.labs.plugins.quickreload.install.PluginInstaller.attemptInstall(PluginInstaller.java:308)
[INFO] [talledLocalContainer] at com.atlassian.labs.plugins.quickreload.install.PluginInstaller.loopWaitingForInstallPromises(PluginInstaller.java:232)
[INFO] [talledLocalContainer] at com.atlassian.labs.plugins.quickreload.install.PluginInstaller.access$000(PluginInstaller.java:36)
[INFO] [talledLocalContainer] at com.atlassian.labs.plugins.quickreload.install.PluginInstaller$1.run(PluginInstaller.java:75)
[INFO] [talledLocalContainer] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[INFO] [talledLocalContainer] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[INFO] [talledLocalContainer] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[INFO] [talledLocalContainer] at java.lang.Thread.run(Thread.java:748)
[INFO] [talledLocalContainer] Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle com.mycompany.jira.plugins.myapp [216]: Unable to resolve 216.0: missing requirement [216.0] osgi.wiring.package; (osgi.wiring.package=com.atlassian.upm.license.storage.plugin)
[INFO] [talledLocalContainer] at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3974)
[INFO] [talledLocalContainer] at org.apache.felix.framework.Felix.startBundle(Felix.java:2037)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:955)
[INFO] [talledLocalContainer] at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:942)
[INFO] [talledLocalContainer] at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:400)
[INFO] [talledLocalContainer] 2018-03-12 15:47:27,806 QuickReload - Plugin Installer INFO [c.a.l.p.quickreload.install.PluginInstallerMechanic]
In the Apache Felix webconsole I see the following:
Imported Packages (of my plugin):
!! com.atlassian.upm.license.storage.plugin,version=0.0.0 from -- Cannot be resolved
!! org.mockito,version=0.0.0 from -- Cannot be resolved
!! org.mockito.internal.matchers,version=0.0.0 from -- Cannot be resolved
!! org.springframework.osgi.service.exporter.support,version=0.0.0 from -- Cannot be resolved but is not required
!! org.springframework.osgi.service.importer.support,version=0.0.0 from -- Cannot be resolved but is not required
Fiesta is shown without error messages:
Exported packages:
com.deiser.jira.fiesta.api,version=1.4.1
com.deiser.jira.fiesta.api.wrapper,version=1.4.1
Maybe one can help me, where I have my mistake in the pom file to use the api classes of the fiesta plugin.
Furthermore, when I'm able to use the classes I want to add the fiesta plugin to my plugin obr to get it installed together with my plugin! (but that's not my very first goal)
Kind Regards
Update
<Import-Package>
*;version="0";resolution:=optional
</Import-Package>
in my instructions section solved my problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Import-Package>
*;version="0";resolution:=optional
</Import-Package>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does this need to be added to the atlassian-plugin.xml file?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.