Description / Features
The plugin enables analysis of ActionScript projects within Sonar. This plugin handles 4 maven plugins that gather the data : FlexMetrics for base metrics, FlexPMD for coding rules violations and FlexMojos for unit tests.
Version in italic can be overridden in pom.xml.
0.3, 0.3.1, 0.4
And of course all built-in functionality of Sonar are available : dashboard, drilldown, clouds...
You can see real life example of this plugin on Nemo : http://nemo.sonarsource.org/project/index/com.adobe:as3corelib
Usage & Installation
Since the plugin handles Adobe maven plugins that are not in the central repo, it is necessary to add the Adobe repo in settings.xml :
- Copy the jar into /extensions/plugins/ directory
- Restart Sonar Web server
You don't need to do anything at this point if your project can be built with Maven and FlexMojos, but if not then you should create a pom.xml at the root of the project :
- Launch a quality analysis on a flex project : "mvn sonar:sonar -Pflex"
Note 1: If you want to have unit test results in your Sonar dashboard, the best option is execute your unit tests before running the Sonar analysis and to use "sonar.dynamicAnalysis=reuseReports" along with "sonar.surefire.reportsPath" property to specify where Sonar should find the XML result files.
Note 2: Since version 0.4 you can provide path to coverage report (in cobertura xml format) using property "sonar.cobertura.reportPath"