Hello, I got a problem with Spring Scanner(SS) annotation when tried to finish Jira custom mail handler plugin tutorial. I need to add <component> element to atlassian-plugin.xml but according to error:
[ERROR] atlassian-plugin.xml contains a definition of component. This is not allowed when Atlassian-Plugin-Key is set.
I must use SS annotation for component injection. I upgraded my SS module from 1.2.13 to 2.0.x from here but problem with component still exists:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project mail-handler-demo: Compilation failure
[ERROR] /C:/Users/Administrator/Jira/new_jira/mail-handler-demo1/src/main/java/com/example/plugins/tutorial/jira/mailhandlerdemo/IssueKeyValidator.java:[8,2] cannot find symbol
[ERROR] symbol: class Component
[ERROR] -> [Help 1]
Here are attached main plugin files (log, xml + descriptor and class file with annotation).
I'm using Atlassian SDK 6.14 to create plugin with atlas-create-jira-plugin command.
Java_Home is ok - pointing on jdk 1.8.x
Any suggestions? This looks pretty strange...
Waiting for responses or questions.
Thank you for answer. My problem was not in <component> tag (i removed it in the beging of project) but in @Component annotation. I needed to add Springframework dependency to use @Component.
With this dependency I can use class import in my java class:
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...
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