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

Ed Jackson May 9, 2017

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 votes
devpartisan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 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 Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events