Hi, I create plugin for example Tutorial - Custom message (mail) handler for JIRA, but when I compiler plugin than Show error: atlassian-plugin.xml contains a definition of component. This is not allowed when Atlassian-Plugin-Key is set.
In file atlassian-plugin.xml include text:
Jira version 7.x
I believe you need to use the @ComponentImport
annotation instead of including a component-import
statement in your atlassian-plugin.xml
file. See Atlassian Spring Scanner.
If you are defining a component in your atlassian-plugin.xml
file, then you need to use the @Component
annotation. Here’s the example included in the Atlassian Spring Scanner documentation:
@ExportAsService
@Component
public class ExposeToOSGIComponent
{
private final IssueService issueService;
private final InternalComponent internalComponent;
@Autowired
public ExposeToOSGIComponent(@ComponentImport final IssueService issueService,final InternalComponent internalComponent)
{
this.issueService = issueService;
this.internalComponent = internalComponent;
}
}