Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Access com.atlassian.greenhopper.* Java API

Hey guys,

I try to develop a Plugin for Jira Agile. Therefore I integrated the maven dependency:

<dependency>
     <groupId>greenhopper</groupId>
     <artifactId>jira-greenhopper-plugin</artifactId>
     <version>6.3.4.3</version>
     <scope>provided</scope>
</dependency> 

Now I am trying to access the com.atlassian.greenhopper.EventListenerRegistry class and the implementation of the 
com.atlassian.greenhopper.manager.issuelink.EpicLinkManager Interface. But when I add for instance to the 
atlassian-plugin.xml file the following:
 

<component-import key="epicLinkManager" interface="com.atlassian.greenhopper.manager.issuelink.EpicLinkManager"/>
The plugin doesnt start with hundreds of error messages. Does anybody have an idea what this could be?

In comparison, when I add something of the package com.pyxis.greenhopper.XXX to the atlassian-plugin.xml 
it works. What do I do wrong here? I worked with this Javadoc (https://docs.atlassian.com/greenhopper/6.3.3/). There 
both packages are described. 

Cheers,
Manu


					
				
			
			
			
				
			
			
			
			
			
			
		

3 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted

To answer the question by myself: It is simply NOT possible to access the services I would need ,what is very frustrating in my opinion, these services would make life MUCH easier! Why are they even mentioned if they cannot be used?

I found my answer in this thread after very long time of searching: https://answers.atlassian.com/questions/166627/how-to-access-greenhopper-services-and-managers

I also read it would be possible to use reflections to retrieve these services. I would not know how to implement that. Does anybody have an idea how this can be done?

Cheers,

Manu

What I did is install the JIRA Agile plugin in the Maven repository with

mvn install:install-file -Dfile=plugin.2028706680741470180.jira-greenhopper-plugin-6.3.6.1.jar -DgroupId=com.atlassian.jira.plugins -DartifactId=jira-greenhopper-plugin -Dversion=6.3.6.1 -Dpackaging=jar

And put a provided dependency on it in the pom.xml. That worked for compilation.

Regards,

Bas

  1. run
    atlas-debug
    in your project directory to start up the server
  2. download jira agile from the addon marketplace and install it (just like you would on the real server)
  3. in your `pom.xml` add the following lines
    <dependency>
    <groupId>com.atlassian.jira.plugins</groupId>
    <artifactId>jira-greenhopper-plugin</artifactId
    <version>6.3.12</version>
    <scope>provided</scope>
    </dependency>
  4. build on the commandline so that maven can download the whole internet (grab a coffee while doing this) `atlas-compile`
  5. now reimport the project in the IDE (or do a "maven update dependencies") so that the newly downloaded jars
  6. now you can reference the classes from the greenhopper plugin

I haven t done the <component-import> since I did not need it from my project but I assume that this should work as stated in other posts of this question.

Note that there is also the jira-greenhopper-api maven artifact which you might want to look at. To figure out whats available, have a look at

https://maven.atlassian.com/content/groups/public/com/atlassian/jira/plugins/

https://maven.atlassian.com/content/groups/public/com/atlassian/jira/plugins/jira-greenhopper-plugin/

TAGS
Community showcase
Published in Confluence Cloud

Share your Confluence Cloud experience for a chance to win $500!

Take our 5-minute survey to win a $500 Visa gift card! Are you currently using Confluence Cloud? We want to hear from you! Fill out this quick survey about your Confluence Cloud experience so we ...

63 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you