spring-scanner and shading in bamboo plugin Edited

Using the Atlassian SDK, I was able to successfully deploy a Bamboo plugin with a single task that injects EventPublisher using atlassian-spring-scanner 1.2.13.  Hooray!

Unfortunatly, when I attempted to integrate the same logic into an existing plugin that is fairly complex, things did not work so well.  What is different about this plugin is that it is using shading which causes the maven package task to hang when generating the manifest.

[INFO] Generating a manifest for this plugin
[INFO] using maven-bundle-plugin v2.5.3

According to this stackoverflow post, it is due to the order of the bamboo-maven-plugin which executes before shading has occured.


I've tried most of the suggestions in this post (the ones I understand anyway) without much luck.  So basically my question is, what do I need to do in order to use maven-bamboo-plugin to prep the osgi dependencies in order to use atlassian-spring-scanner while still working with shading.

The relevant parts of my package are listed below.




<!-- See here for an explanation of default instructions: -->
<!-- https://developer.atlassian.com/docs/advanced-topics/configuration-of-instructions-in-atlassian-plugins -->

<!-- Add package to export here -->

<!-- Add package import here -->

<!-- Ensure plugin is spring powered -->
<!-- It appears upber jars are needed for Bamboo plugins -->
<!-- https://bitbucket.org/dehringer/bamboo-cloudfoundry-plugin/src/99b93a6aba4f7abfec3055da06303f5dba3fc5f9/pom.xml?at=master -->
<!-- needed to make the shaded dependencies available on the remote
agent classpath -->
<!-- don't understand why this is necessary, but the plugin throws
a NoClassDef without it -->
<!-- exclude signatures of shaded jars -->
<!-- Unnecessary jars can cause errors with class loading on the remote
agents. These are getting pulled in as test dependencies -->


1 answer

1 accepted

1 vote
Answer accepted

For anyone stumbling here, it appears that the manifest creation did actually complete but it took quite a long time (30 seconds or so).   Ultimately, I ended up creating my own EmailService instead of using the atlassian wired EventPublisher service due to:



Thanks for letting us know!

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Opsgenie

Getting the Most out of Atlassian and Opsgenie Together

We’re excited to invite you to this action-packed webinar where we will demonstrate how to integrate Opsgenie’s powerful alerting and on-call management tools with your entire Atlassian stack. Mar...

63 views 0 0
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