Hi guys,
We want to create a new reporting chart for Jira 5.2, we need to extend some class in jira-gadget-plugin module, which is showing in plugins\.bundled-plugins (it will be loaded as osgi module in plugins\.osgi-plugins).
I have pom.xml amps config section like the following:
<plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>${amps.version}</version> <extensions>true</extensions> <configuration> <productVersion>${jira.version}</productVersion> <productDataVersion>${jira.version}</productDataVersion> <pluginDependencies> <pluginDependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-gadgets-plugin</artifactId> </pluginDependency> </pluginDependencies> <instructions> <Import-Package> com.atlassian.jira.gadgets*;version="0.0" </Import-Package> </instructions> </configuration> </plugin>
But when I trying to install my plugin, I found the following error
Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle test.myplugin [103]: Unable to resolve 103.0: missing requirement [103.0] p ackage; (&(package=com.atlassian.jira.gadgets)(version>=0.0.0)) at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3409) at org.apache.felix.framework.Felix.startBundle(Felix.java:1709) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:905) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:892) at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugin.java:417) ... 90 more
Does any one know why the error occured? And how can I extend the classes in the jira bundled plugins?
The following is what I guess, it is because the OSGI Manifest file for jira-gadgets-plugin does not have "Export-Package", the following is part of the manifest file for jira-gadgets-plugin:
Manifest-Version: 1.0 Private-Package: script.chartpopup,templates,com.atlassian.jira.gadget s.system,com.atlassian.jira.chartpopup,.,script,com.atlassian.jira.st reams,gadgets,com.atlassian.jira.chartpopup.model,style,style.old,ima ges,com.atlassian.jira.gadgets.system.util Built-By: bamboo-agent Tool: Bnd-0.0.311 Bundle-Name: Atlassian JIRA - Plugins - Gadgets Plugin Created-By: Apache Maven Bundle Plugin Bundle-Vendor: Atlassian Build-Jdk: 1.6.0_27 Bundle-Version: 5.2 Spring-Context: *;timeout:=60 Bnd-LastModified: 1352364796446 Bundle-ManifestVersion: 2 Bundle-Description: Provides Gadgets and REST endpoints bundled with J IRA Import-Package: com.atlassian.core.util;version="[5.2.0,5.2.0]",com.at lassian.crowd.embedded.api;version="[5.2.0,5.2.0]",com.atlassian.gadg ets;version="3.2",com.atlassian.gadgets.dashboard;version="3.2",com.a tlassian.gadgets.dashboard.spi;version="3.2",com.atlassian.gadgets.di rectory.spi;version="3.2",....
......
Many thanks all.
Leon
Community moderators have prevented the ability to post new answers.
Last time I tried to extend a standard JIRA gadget I ended up copying a lot of the source code and changing the Java package :-( It doesn't feel like this was a use case that was really considered when gadgets were created.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.