Migrate to Spring Java Config
Atlassian Spring Scanner
Adopting this kind of plugin build will help avoid install time or boot time transformation of the plugin.
(OSGi manifest generated by build is same one used when customer installs)
It will also decrease server start time.
migrate to using Java config: https://developer.atlassian.com/server/framework/atlassian-sdk/spring-java-config/
uses code instead of XML, providing more power and better tooling
uses a simpler, more reliable toolchain requiring little experience with Atlassian products
allows components to be created conditionally
keeps business logic free of dependency injection concerns