|
Hi guys,
After some dig. I found out the possible reason.
When sonar-server startup, it will do some steps:
1.it will store the classloader of sonar-l10n-en-plugin
2.visits all of plugins who is not the child of sonar-l10n-en-plugin, and gathers the classloader of them will such rules:
bundleToClassloaders.put(BUNDLE_PACKAGE + metadata.getKey(), classLoader);
So it there is a plugin named findbugs, the related information will be {org.sonar.l10n.findbugs=classLoader}
3. Then we do the startup job. Sonar visits all of rules and try to check their name and description will locale.ENGLISH.
for example: rule.findbugs.J2EE_STORE_OF_NON_SERIALIZABLE_OBJECT_INTO_SESSION.name, its bundleKey is org.sonar.l10n.findbugs
3.1. At first sonar try to find Bundle with "org.sonar.l10n.findbugs" from classloader of sonar-l10n-en-plugin. if exists, it will use classloader of sonar-l10n-en-plugin to get the name and description of this rule.
3.2 if not exists, it will use bundleKey to find the related classloader of plugin.
There is the problem, if I used sonar-l10n-zh-plugin, sonar will get a ResourceBundle instance from classloader of sonar-l10n-en-plugin, but there is no org/sonar/l10n/findbugs.properties,only org/sonar/l10n/findbugs_zh.properties, and there is no related html for findbugs, so sonar will throw an Exception about cannot find the description about this rule.
Now, the way I solved this problem is copy all of html - including findbugs, pmd, checkstyle, squidjava - to sonar-l10n-zh-plugin, then sonar could startup successfully.
But it caused duplicated files in jar, Is there other way to solve this problem. Please tell me about how to deal with this, Thank you very much.
regards
2012-10-25
--------------------------------------------------------------------------------
XuHuiSheng |
|
Thanks a lot for your help to investigate this issue XuHuiSheng !
JIRA ticket is created and we should release Sonar 3.3.1 next week : https://jira.codehaus.org/browse/SONAR-3910
Kind regards
-----
Sonar for Continuous Inspection On Thu, Oct 25, 2012 at 10:52 AM, xyz20003 <[hidden email]> wrote:
|
| Powered by Nabble | Edit this page |
