Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
Level
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

How can I get modules of Jira Toolkit Plugin

I think that Jira Toolkit Plugin has some functionality I need in my script. So I try to get it's modules like described here 

@WithPlugin('com.atlassian.jira.toolkit')

@PluginModule 
???

And I don't know which modules is in the plugin.  I mean that in docs said that I have to annotate class with @PluginModule to inject it from plugin to my script but where can I check which classes can be injected?

May be somewhere on the Jira server atlassian-jira-software-xxx-standalone/atlassian-jira/WEB-INF/ there is some pom.xml or manifest file where I can find which packages of Jira Toolkit are imported ?

1 answer

1 accepted

0 votes
Answer accepted

You could try to download and extract the files from the jar (go the marketplace plugin page, select version, then see all, then dowload the latest version as a .jar file).

Then either explore the various .class files to get some clues or take the extra step to decompile them in an IDE.

Thanks for advice.

And then I can use it's classes in my script? I mean if I'll find out that I need SomeClass from jar I can add it like this:

@WithPlugin('com.atlassian.jira.toolkit')

@PluginModule 
SomeClass object

And am I right that it means jira toolkit plugin is OSGI bundle which can export its services to my groovy script? 

I think it depends on the class.

Not every class is registered as a module.

It's like the difference between com.atlassian.jira.issue.IssueManager and com.atlassian.jira.issue.Issue. You can use Issue directly. But IssueManager has to be obtained via componentAccessor.

If the class has a constructor defined, you might be able to just call define it line

def someClassInstance = new SomeClass(contructorParameters)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Marketplace Apps & Integrations

New Cloud Apps Roundup - Spring 2021

Atlassian's marketplace partners have had a very productive start to 2021! Since our last roundup, our developer community has added over 160 new cloud apps to the Atlassian Marketplace to help you...

202 views 3 19
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