New features (since 1.2) :
warnings for 1.2.2 :
New features (since 1.1) :
Execute your report plugins or lauch "mvn site". Then call xradar's goals :
goal | description |
---|---|
net.sf.xradar:maven-xradar-plugin:audit | the static audit |
net.sf.xradar:maven-xradar-plugin:dynamic | the dynamic audit |
<build> <plugins> ... <plugin> <groupId>net.sf.xradar</groupId> <artifactId>maven-xradar-plugin</artifactId> <version>1.2.2</version> </plugin> </plugins> </build>
<reporting> <plugins> ... <plugin> <groupId>net.sf.xradar</groupId> <artifactId>maven-xradar-plugin</artifactId> <version>1.2.2</version> </plugin> </plugins> </reporting>
Just add the maven-xradar-plugin declaration in your pom, then execute mvn site :
<reporting> <plugins> <plugin> <groupId>net.sf.xradar</groupId> <artifactId>maven-xradar-plugin</artifactId> <version>1.2.2</version> </plugin> </plugins> </reporting>
See the result in the report section of your project's site.
Add your custom configurations and at last the maven-xradar-plugin declaration in your pom, then execute mvn site or mvn clean compile site :
For example :
<reporting> <plugins> ... <plugin> <artifactId>maven-pmd-plugin</artifactId> <configuration> <linkXref>true</linkXref> <sourceEncoding>utf-8</sourceEncoding> <minimumTokens>100</minimumTokens> <targetJdk>1.5</targetJdk> </configuration> </plugin> ... <plugin> <groupId>net.sf.xradar</groupId> <artifactId>maven-xradar-plugin</artifactId> <version>1.2.2</version> <configuration> <autoRadar>true</autoRadar> <!--false to execute only the plugins declared--> </configuration> </plugin> </plugins> </reporting>
Add the maven-xradar-plugin declaration in your pom and configure the path to the already report files generated, then execute mvn site :
For example :
<reporting> <plugins> <plugin> <groupId>net.sf.xradar</groupId> <artifactId>maven-xradar-plugin</artifactId> <version>1.2.2</version> <configuration> <autoRadar>false</autoRadar> <!--need to be set at false--> <reportPmd>${project.build.directory}/resources/pmd.xml</reportPmd> <reportCheckstyle>${project.build.directory}/resources/checkstyle.xml</reportCheckstyle> </configuration> </plugin> </plugins> </reporting>
To analyse your project, XRadar, and therefore its maven plugin, needs a couple more files:
Note, that if you didn't create those files XRadar will use default ones.
you can see default files as examples here : xradar-config-default.xml and here : default-release.properties
To have XRadar static and dynamic analyse of your project run " mvn site ". To be sure that your are analysing the last version of your code run " mvn clean compile site ".
WARNINGS :
<locales>...</locales>
On Linux :
export MAVEN_OPTS='-Xmx512m'
On Windows :
set MAVEN_OPTS='-Xmx512m'
The plugin comes with a lot of possible option to configure:
<build> <sourceDirectory>path/to/source</sourceDirectory> <!--if different from src/main/java--> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.5</source> <target>1.5</target> </configuration> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>net.sf.xradar</groupId> <artifactId>maven-xradar-plugin</artifactId> <version>1.2.2</version> <configuration> <xradarTarget>${basedir}/releaseStatic/docs/</xradarTarget> <xradarConfig>${basedir}/etc/xradar-config-default.xml</xradarConfig> <xradarProperties>${basedir}/etc/default-release.properties</xradarProperties> <javadocEnabled>true</javadocEnabled> <debug>true</debug> </configuration> </plugin> </plugins> </reporting>
You can change any of those parameters. Here is a quick ref:
Parameter | Description | Default value |
---|---|---|
autoRadar | the automatic mode | true |
xradarConfig | Location of XRadar configuration file | ${basedir}/src/main/resources/xradar/radar-config.xml |
xradarProperties | The xradar's properties | ${basedir}/src/main/resources/xradar/release${project.version}.properties |
debug | The debug mode | false |
debugMojo | The debug mojo mode | false |
xradarTarget | The radar target for docs | ${project.build.directory}/site/xradar/ |
aggregate | When running on a multi-modules project, aggregate the report in the parent project | false |
reportJdepend | Location of the generated Jdepend's report | ${project.build.directory}/jdepend-report.xml |
reportCkjm | Location of the generated ckjm's report | ${project.build.directory}/ckjm-report.xml |
reportCpd | Location of the generated cpd's report | ${project.build.directory}/cpd.xml |
reportPmd | Location of the generated pmd's report | ${project.build.directory}/pmd.xml |
reportFindBugs | Location of the generated findbugs' report | ${project.build.directory}/findbugs.xml |
reportCheckstyle | Location of the generated checkstyle's report | ${project.build.directory}/checkstyle-result.xml |
reportCobertura | Location of the generated cobertura's report | ${project.build.directory}/site/cobertura/coverage.xml |
reportCobertura | Location of the generated emma's report | ${project.build.directory}/site/emma/coverage.xml |
reportJavancss | Location of the generated javancss's report | ${project.build.directory}/javancss-raw-report.xml |
reportJUnit | Location of the generated junit's report | ${project.build.directory}/junit.xml |
enableCkjm | true to enable, false to disable | true |
enablePmd | true to enable, false to disable | true |
enableFindBugs | true to enable, false to disable | true |
enableCpd | true to enable, false to disable | true |
enableCheckstyle | true to enable, false to disable | true |
enableJavancss | true to enable, false to disable | true |
enableCobertura | true to enable, false to disable | true |
enableEmma | true to enable, false to disable | true |
enableJxr | true to enable, false to disable | true |
enableJavadoc | true to enable, false to disable | true |
enableJUnit | true to enable, false to disable | true |
classDirectory | Location of the generated classes | ${project.build.outputDirectory} |
plugin name | plugin version (automatic mode) |
---|---|
Jdepend | 2.9.1 (core version) |
Ckjm | 0.4 |
Pmd | 2.4 |
Findbugs | 2.0.1 |
Cpd | 2.4 |
Checkstyle | 2.2 |
Javancss | 2.0-beta-2 |
Cobertura | 2.3 |
Emma | 1.0-alpha-1 |
Jxr | 2.1 |
Javadoc | 2.5 |