Is there a simple example project for embedding the plugin framework?

I'm struggling to figure out the process for successfully embedding the Atlassian Plugin Framework, and am interested in whether there are any simple example projects out there that use it. It doesn't matter to me if it's an officially-blessed Atlassian project or something a third-party developer has put online -- I'd just love to see some code so I can better understand what I'm missing.

Note that I've followed the Quick Start guide, and have gotten as far as building a plugin container app, as well as a simple plugin to deploy within the app. But I can't get any data shared from the app into the plugin (tons of proxy-based NullPointerExceptions), nor can I figure out how to move from the now-deprecated methods that are mentioned in the Quick Start guide to the new methods that replace them.

Am I up a creek on this?

Thanks a ton, in advance!

1 answer

1 vote
Joe Clark Atlassian Team Feb 28, 2012

I know a few people have successfully run the plugin framework standalone, but for the life of me I can't find any links to prove it.

As an alternative, you could try looking at the Atlassian RefApp, which is a bare bones implementation of a web app with the plugin framework + some other bits and pieces (like SAL): https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/refapp/atlassian-refapp/2.9.1/

Thanks, Joseph -- I'll take a look at that. You linked to the v2.9.1 one -- should I be looking at v2.12.1 instead, though?

https://maven.atlassian.com/content/repositories/atlassian-public/com/atlassian/refapp/atlassian-refapp/2.12.1/

Likewise, do you have any good ideas for how to debug plugins in an IDE? As they're loaded from JARs by the plugin container app, they're not exactly debuggable very easily... which is making hunting down the NPEs that I'm experiencing VERY hard. All I know at this point is that it's occurring on line 128 of com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar, in the ContextClassLoaderSettingInvocationHandler.invoke method -- the specific line is:

thread.setContextClassLoader(this.service.getClass().getClassLoader());

and I have no real way to figure out which object is throwing the NPE...

Joe Clark Atlassian Team Feb 29, 2012

Any version of the refapp should be useful. Sorry for not giving you a link to the latest one- I just scrolled to the bottom of the parent directory and picked the highest number I could find. :-)


Debugging the plugin will depend on the host app's support for debugging. The Atlassian products all support a development mode that can start up a standard debugger that IDEs can connect to to debug plugins or the host application itself. (See atlas-debug)

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 31, 2018 in Marketplace Apps

Marketplace Spotlight: Zephyr

Hello Atlassian Community! Each month, we run a series of Spotlights to highlight Marketplace vendors and apps that our team thinks this Community would find valuable. In last month's Spotlig...

355 views 0 1
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you