As a newcomer to Atlassian, I spent my first few weeks on the company’s brand new Bootcamp program. Doubtless we’ll write more about Bootcamp soon, but to give a brief summary, new joiners get to attend technical classes given by other Atlassians, and work on improvements across a wide range of products and codebases. This way, we get a solid introduction to the company as a whole, and we’re quickly able to make contributions that span further than our specific product or area of expertise.
In the last week of the program, Bootcampers get to implement their very own Atlassian plugin. There’s a lot of great documentation and helpful tools for plugin developers, but I did run into a few gotchas as I took my first steps. In particular, I found that adding new dependencies would often result in a range of mysterious runtime errors about missing resources or class incompatibilities. Happily, there was a simple, common cause to my problems: I was bundling too many dependencies with my plugin.
The solution is straight forward: make sure any dependencies that are already provided by the runtime environment (i.e. the host application, plugin framework or app server) are included with scope
provided in your plugin’s pom.xml – not the default, which is
compile. For example:
For more detail, see the troubleshooting documentation. Also, don’t forget to check out John Kodumal’s Big Modular Plugins presentation, which makes the point very clear: don’t bundle a dependency with your plugin unless you’re totally sure you have to!