Hi,
I've imported com.atlassian.sal.api.ApplicationProperties into MyPluginComponentImpl.java where getDisplayName() method is called on an ApplicationProperty instance/object within public String getName() method, however when i run atlas-run within the same directory as the pom.xml file, the command prompt displays an error: "[ERROR] .../myGadget/jira-gadget-tutorial-plugin/src/main/java/com/atlassian/plugins/tutorial/impl/MyPluginComponentImpl.java:[28, 70] cannot find symbol
symbol: method getDisplayName()
location: variable applicationProperties of type com.atlassian.sal.api.ApplicationProperties"
I've included the <dependency> "com.atlassian.sal" amongst others within the pom.xml file (<version> 2.1.beta4), I've also included the<dependency> "org.codehaus.cargo" (<version> 1.4.4) and ran the command "atlas-mvn eclipse:eclipse" but still no luck!
However, i've used this same implementation of MyPluginComponentImpl.java for another JIRA plugin, which uses the same package (i.e. com.atlassian.sal.api.ApplicationProperties) and calls the same method getDisplayName(), but this seems to work no problem, when i run atlas-run within plugin root/home directory.
Can anyone explain whats going on here? is it a version/compatibility issue?
Can you just comment out (omit) the <component-import> tag section within the atlassian-plugin.xml file and leave it at that or do you have to use spring-scanner as the alternative, and is spring-scanner declared within the same xml file or is this declared within one of the java files for the plugin/gadget?
Could you provide your pom.xml? Usually spring-scanner is included there. There must be something like this
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>provided</scope>
</dependency>
Then you need to find places in your project where the components are used and see if it is injected the proper way. I would need to see some of your code
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should delete all component-import tags in atlassian-plugin.xml and import all components through spring-scanner.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have any other questions regarding the error, just ask.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I Figured this out, it was the version i was using for <dependency> com.atlassian.sal, changed this from 2.1.beta4 to 2.7.0
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>2.7.0</version>
<scope>provided</scope>
</dependency>
Now i get another error further within the build process, which states: "atlassian-plugin.xml contains a definition of a component-import. This is not allowed when Atlassian-Plugin-Key is set." Any ideas what's wrong here?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.