| Name | Java Ecosystem |
|---|---|
| Latest version | 1.12 ( 22 December 2012 13 March 2013 ) |
| Requires Sonar version | 3.4 or higher ( check version compatibility ) |
| Download | JavaEcosystem-1.2.0.zip |
| License | GNU LGPL 3 |
| Developers | SonarSource |
| Issue tracker | http://jira.codehaus.org/browse/SONARJAVA |
| Sources | https://github.com/SonarSource/sonar-java |
...
The Java Ecosystem is a set of Sonar plugins used to monitor the quality of Java projects within Sonar.
It is compatible with the Sonar Eclipse plugin to track violations while coding. It is also compatible with the Issues Report plugin to run pre-commit local analysis.
Installation
The Java Ecosystem is a set of plugins:
...
Sample projects for each analyzer are available on GitHub that can be browsed or downloaded: /projects/languages/java
Notes:
- The source directory should be set to the directory containing the top parent package. For example, if your directory structure is 'src/main/java/com/mycompany/...', the source directory must be set to 'src/main/java'.
- The source directory tree has to match the package declaration. For example, the following class:
| Code Block | ||||||
|---|---|---|---|---|---|---|
| ||||||
package com.mycompany.mypackage;
... |
must be located in the following directory: [mySourceDirectory]/com/mycompany/mypackage/MyClass.java. Otherwise you would get such an error while running your analysis:
| Code Block | ||||
|---|---|---|---|---|
| ||||
Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.sonar.squid.api.AnalysisException: Got an exception - org.sonar.squid.api.AnalysisException: The source directory does not correspond to the package declaration com.mycompany.mypackage, file : ..\src\MyClass.java
... |
Tests and Code Coverage
The default code coverage engine for unit tests can be set in Settings > Configuration > General Settings > Java > Code coverage plugin property.
...
FAQ
See Java Ecosystem FAQ.
...
Metrics
See Java Metric DefinitionsSee Metrics documentation page.
Android
A sample project with code coverage computed with Emma is available on GitHub that can be browsed or downloaded: /projects/android
...
To navigate the AST, download the SSLR Java Toolkit.
Change Log
| JIRA Issues | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| JIRA Issues | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| JIRA Issues | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|

