Error when trying to create an additionalBuildConfiguration plugin

Description of the plugin

With the following definition:

    <additionalBuildConfigurationPlugin key="myKey" name="myName"
        <resource type="freemarker" name="edit" location="additionalPlanConfiguration/edit.ftl"/>



And the class:

public class Configurator extends BaseConfigurablePlugin implements MiscellaneousPlanConfigurationPlugin {

    public Configurator(@ComponentImport TemplateRenderer renderer) {
        this.templateRenderer = renderer;
// Rest of methods


I still get a null templateRenderer, or “no qualifying bean” or errors telling me that the TemplateRenderer can’t be used. If i use annotations, class fails to load because i have no bean to inject. Other solutions throw NullPointerException when trying to use it later (it doesn’t get correctly injected).

I have tried everything i have seen, and still can’t make it work.

Thinkgs that i have tried

I have tried to:

Import this:


In in the project POM.

Use different Inject, ComponentImport, Autowired and other annotations, to no effect.
Attempt to configure it following other similar plugins… still no success.

Atempted to inject an implementation, instead of the TemplateRenderer interface, still not working.

I have ran out of ideas, this is a cry for help!!!

Thank you very much!

PS: If you need additional information please make me know.

Author here, found a solution!!!

In my class, define the annotation com.atlassian.plugin.spring.scanner.annotation.component.Scanned.

public class Configuration extends BaseConfigurablePlugin implements MiscellaneousPlanConfigurationPlugin {

    protected TemplateRenderer templateRenderer;

// Rest of class

And it works like a charm!