How to build a Bamboo plugin with both server and agent components?

I've been asking a lot of n00bish questions recently, and here's another:

If a plugin includes both a build task (which obviously runs on the agent) and portions that need to live on the server, can it be built as a single jar? There's no problem on the server side, but because the agent doesn't include all the same dependencies, the plugin fails to resolve (even though the task portions of the code don't need those dependencies).

Would it be normal practice just to mark all the server-side dependencies as optional so they don't stop the plugin loading on the agent? Or would one generally build a separate agent plugin? Or is there some way to tell the agent to only load certain modules?


1 answer

0 vote
Ian Buchanan Atlassian Team Aug 30, 2017

This doesn't sound n00bish at all. And I would ask again over on the developer commuity just to see if you can get a 2nd opinion.

I'm not sure what's "normal", but I would be inclined to build separate plugins. Dependencies are hard enough to manage, by trying to manage the set of dependencies for 2 "paths" through your plugin, it could be very error prone. I'm most afraid that you'd have a slow feedback loop and potentially confusing bugs.

I don't know of any way to tell agents to only load certain modules.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,087 views 0 5
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot