I'm trying out the JIRA report plugin tutorial: https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Creating+a+JIRA+Report
Working on the code in Eclipse I get a lot of error messages about imports that cannot be resoved. It seems pretty random which of them are OK, and which one is not. Compiling and running the plugin works fine, but those messages are pretty annoying:
I'm usually not developing in Eclipse or Java so it might be some setting I'm missing. I'm pretty sure though that the setup is according to what is described at Atlassian's developer website.
@Atlassian: Could be a good idea to update this example since the OutlooDateManager is deprecated.
As you have already noticed, the tutorial is outdated. It includes some deprecated classes, and it ALSO includes classes that are no longer loaded by the jira 5 dependencies.
For instance com.opensimphony.user.User was replaced for com.atlassian.crowd.embedded.api.User on JIRA 5, I'm pretty sure that is the case for the other classes to.
I'm glad I could help! :)
Seems to be the case. I actually thought of this as a possibility, but the only thing I could think of to check was the Atlassian API documentation. The classes in question are still documented. The OutlookDateManager class is marked as deprecated, so I expected o find similar information about the ones that were not found.
Any idea on how to find out which classes to use?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually, after fixing the User class it is only the I18nBean class which is not resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You need to use I18nFactory, which can be injected into your Servlet:
private final I18nHelper.BeanFactory i18nFactory public MyClassConstructor(I18nHelper.BeanFactory i18nFactory) { this. i18nFactory = i18nFactory }
then you can create a I18nHelper
I18nHelper i18n = i18n = i18nFactory.getInstance(req.getLocale());
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.
Hmmm. I think I got it!
As you have already noticed, the tutorial is outdated. It includes some deprecated classes, and it ALSO includes classes that are no longer loaded by the jira 5 dependencies.
For instance com.opensimphony.user.User was replaced for com.atlassian.crowd.embedded.api.User on JIRA 5, I'm pretty sure that is the case for the other classes to.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Fixed a few other issues:
Changes from before: None! :(
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.
Was the problem solved after changing the maven installation to plugin-sdk?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Correction: The plugin does not work. What I did was to run atlas-run, which started the JIRA instance. In the JIRA instance I located the plugin from the admin view. Only when I created a project did i found out that the plugin caused a blank project summary screen. The log reports about compilation problems.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Which Maven repository are you using Eclipse's or Jira's?
I had the same problem as you because I was using the default maven installantion from Eclipse.
Try changing it in preferences->maven->installations
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was using the Embedded Maven, thought I changed it ... Anyway, adding the Atlassian SDK Maven did the solve thi issue.
It says in the Installations dialog: Note: Embedded runtime is always used for dependency resolution, but does not use global settings when it is used to launch Maven. Does this mean there is no way around?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If compiling and running works fine, then your Eclipse project classpath is outdated. Try recreating the eclipse project by:
mvn eclipse:clean eclipse:eclipse
and refresh the project in Eclipse. JIRA version is important for some classes but since you can compile fine using maven, it should be fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You mean atlas-mvn, right?
Thanks for the tip, but the problem persists :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
& you did restart eclipse? Did a refresh of the workspace?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Both! Made no difference.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
clean the project :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Didn't help to clean either.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
did you execute altas-mvn eclipse:eclipse and refreshed the project from Eclipse after changing the maven installation? What was the output?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.