Jira 8 transformer plugins and dependency injection

In testing the Jira 8 preview (8.0.0-m0014 to be exact) with our app, we ran into a dependency injection issue. It appears spring contexts generated by Jira 8 (e.g. atlassian-plugins-host-components.xml) now have default-autowire=“constructor”, whereas Jira 7 used default-autowire=“autodetect”. This broke all beans that were using setter injection in our app.

The fix seems easy enough with the cause known (unless there are additional aspects to this I have yet to stumble upon), and at this point, we probably should get around to that spring-scanner rewrite anyway. Regardless, I was curious:

  • Is the aforementioned change to default-autowire intentional or a bug?
  • Are transformer-plugins to be considered legacy to the point of being deprecated/unsupported at this stage?
1 Like

The change with autowiring is done in the new Atlassian Platform 5.0 (not yet released) and is documented in the atlassian-plugins changelog here.
The changelog is referenced from Java 11 and Jira platform upgrade page for Jira 8.0 (change log section in the bottom).

Here is a copy of the corresponding statement from the Platform changelog

  • Upgraded Spring to Spring 5.0.7. As part of this change, the autowire mode has changed from the deprecated auto-detect mode to ‘by constructor’. Any components that relied on setter injection will need to annotate these setters or fields with @Inject or @Autowired
1 Like