-
Bug
-
Resolution: Fixed
-
High
-
4.3
-
Jira 4.0.1 Standalone, GreenHopper 4.3, Win XP SP2
-
4.03
-
The GreenHopper 4.3 includes possibility to import GreenHopper component to use it in 3rd party plugins (http://jira.atlassian.com/browse/GHS-1917). Actually, this does not work. Even an empty plugin with just component import fails to start.
The plugin descriptor
<atlassian-plugin key="${project.groupId}.${project.artifactId}" name="${project.artifactId}" plugins-version="2"> <plugin-info> <description>${project.description}</description> <version>${project.version}</version> <vendor name="${project.organization.name}" url="${project.organization.url}" /> </plugin-info> <component-import key="greenhopper-service"> <interface>com.pyxis.greenhopper.GreenHopper</interface> </component-import> </atlassian-plugin>
The project pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>pl.atena.jira.plugins</groupId> <artifactId>test.plugin</artifactId> <version>1.0-SNAPSHOT</version> <organization> <name>Example Company</name> <url>http://www.example.com/</url> </organization> <name>test.plugin</name> <description>This is the pl.atena.jira.plugins:test.plugin plugin for Atlassian JIRA.</description> <packaging>atlassian-plugin</packaging> <dependencies> <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>atlassian-jira</artifactId> <version>${jira.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>greenhopper</groupId> <artifactId>jira-greenhopper-plugin</artifactId> <version>4.3</version> <scope>provided</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>com.atlassian.maven.plugins</groupId> <artifactId>maven-jira-plugin</artifactId> <version>3.0.4</version> <extensions>true</extensions> <configuration> <productVersion>${jira.version}</productVersion> <productDataVersion>${jira.data.version}</productDataVersion> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> <properties> <jira.version>4.0.1</jira.version> <jira.data.version>4.0</jira.data.version> </properties> </project>
No classes, or any other files, just the descriptor and the pom in the project.
At startup this produces error like this
2010-03-02 15:28:29,773 main INFO [atlassian.plugin.loaders.ScanningPluginLo ader] Plugin Unit: D:\JIRA4.0.1\home\plugins\installed-plugins\jira-greenhopper- plugin-4.3.jar (1267426406056) created (... other installed plugins...) 2010-03-02 15:28:30,335 main WARN [plugin.osgi.factory.OsgiPlugin] Unable to enable plugin 'pl.atena.jira.plugins.test.plugin' com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: pl.atena.jira.plugins.test.plugin at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugi n.java:385) at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:2 12) at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java: 66) at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultP luginManager.java:545) at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginM anager.java:152) at com.atlassian.jira.plugin.JiraPluginManager.start(JiraPluginManager.j ava:49) at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManag er.java:1275) at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java: 224) at com.atlassian.jira.ComponentManager.start(ComponentManager.java:210) at com.atlassian.jira.upgrade.ConsistencyLauncher.launchConsistencyCheck er(ConsistencyLauncher.java:63) at com.atlassian.jira.upgrade.ConsistencyLauncher.contextInitialized(Con sistencyLauncher.java:42) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 252) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 48) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle 5 0: package; (package=com.pyxis.greenhopper) at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1725) at org.apache.felix.framework.Felix._startBundle(Felix.java:1588) at org.apache.felix.framework.Felix.startBundle(Felix.java:1541) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:371) at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugi n.java:342) ... 25 more 2010-03-02 15:28:30,413 main ERROR [atlassian.plugin.manager.PluginEnabler] Unable to enable plugin pl.atena.jira.plugins.test.plugin com.atlassian.plugin.osgi.container.OsgiContainerException: Cannot start plugin: pl.atena.jira.plugins.test.plugin at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugi n.java:385) at com.atlassian.plugin.impl.AbstractPlugin.enable(AbstractPlugin.java:2 12) at com.atlassian.plugin.manager.PluginEnabler.enable(PluginEnabler.java: 66) at com.atlassian.plugin.manager.DefaultPluginManager.addPlugins(DefaultP luginManager.java:545) at com.atlassian.plugin.manager.DefaultPluginManager.init(DefaultPluginM anager.java:152) at com.atlassian.jira.plugin.JiraPluginManager.start(JiraPluginManager.j ava:49) at com.atlassian.jira.ComponentManager$PluginSystem.start(ComponentManag er.java:1275) at com.atlassian.jira.ComponentManager.quickStart(ComponentManager.java: 224) at com.atlassian.jira.ComponentManager.start(ComponentManager.java:210) at com.atlassian.jira.upgrade.ConsistencyLauncher.launchConsistencyCheck er(ConsistencyLauncher.java:63) at com.atlassian.jira.upgrade.ConsistencyLauncher.contextInitialized(Con sistencyLauncher.java:42) at org.apache.catalina.core.StandardContext.listenerStart(StandardContex t.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4 252) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443 ) at org.apache.catalina.core.StandardService.start(StandardService.java:4 48) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700 ) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) Caused by: org.osgi.framework.BundleException: Unresolved constraint in bundle 5 0: package; (package=com.pyxis.greenhopper) at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1725) at org.apache.felix.framework.Felix._startBundle(Felix.java:1588) at org.apache.felix.framework.Felix.startBundle(Felix.java:1541) at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:371) at com.atlassian.plugin.osgi.factory.OsgiPlugin.enableInternal(OsgiPlugi n.java:342) ... 25 more 2010-03-02 15:28:30,601 main INFO [atlassian.plugin.util.WaitUntil] Plugins that have yet to be enabled: [com.atlassian.jira.ext.charting, pl.atena.jira.plu gin.timesheet, com.atlassian.jira.plugin.labels, pl.atena.jira.plugin.JiraReport sPlugin, com.pyxis.greenhopper.jira, pl.atena.jira.plugin.JiraPortletsPlugin, co m.pyxis.jira.links.hierarchy.reports], 60 seconds remaining 2010-03-02 15:28:34,382 main INFO [atlassian.plugin.manager.DefaultPluginMan ager] Plugin system started in 0:00:51.452
I could not find any documentation, GreenHopper API or HOW-TO for this feature too.