Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot get @ComponentImport to work

davencew
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 9, 2018

I've been trying to get the Event Listener sample working.  This sample works with the old <component-import> mechanism, yet when I create a new plugin is wants to use the new scanning @ComponentImport mechanism by preventing the <component-import>.

 

What I'm finding is that when I build the code, the compiler doesn't recognise @ComponentImport....it gives me a "cannot find symbol ComponentImport" error.

Do I need to import a package to the .java file?

 

As far as I can tell my pom file includes all the scanning stuff I need.

1 answer

0 votes
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 9, 2018

You need to add spring scanner dependency to your plugin. You can find more info here:

https://bitbucket.org/atlassian/atlassian-spring-scanner

I think it is easier to create a new plugin (it will be already created with the required dependency). Then insert your code there.

davencew
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 9, 2018

hi Alexey, thanks for the fast response.  This is a new plugin I created this morning using atlas-create-jira-plugin.

All the scanner stuff looks to be setup correctly, but when I add @ComponentImport to a .java file, it doesn't recognise it.

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
March 9, 2018

Where do you open the plugin? Are you sure that all required dependencies were downloaded?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events