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 -->
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 signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...
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!
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