javancss:check

Check the build if for any Method with a ccn greater than a limit in the source code. Fails the build if told so.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Automatically executes within the lifecycle phase: verify
  • Invokes the execution of this plugin's goal report prior to executing itself.

Required Parameters

Name Type Description
ccnLimit int CCN Limit, any code with a ccn greater than this number will generate a violation Default value is 10.
failOnViolation boolean Whether to fail the build if the validation check fails. Default value is true.
ncssLimit int ncss Limit, any code with a ncss greater than this number will generate a violation Default value is 100.
tempFileName String Name of the file holding the xml file generated by JavaNCSS Default value is javancss-raw-report.xml.
xmlOutputDirectory File Specifies the directory where the XML report will be generated. Default value is ${project.build.directory}.

Parameter Details

ccnLimit CCN Limit, any code with a ccn greater than this number will generate a violation
  • Type: int
  • Required: Yes
  • Default: 10

failOnViolation Whether to fail the build if the validation check fails.
  • Type: boolean
  • Required: Yes
  • Default: true

ncssLimit ncss Limit, any code with a ncss greater than this number will generate a violation
  • Type: int
  • Required: Yes
  • Default: 100

tempFileName Name of the file holding the xml file generated by JavaNCSS
  • Type: java.lang.String
  • Required: Yes
  • Default: javancss-raw-report.xml

xmlOutputDirectory Specifies the directory where the XML report will be generated.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.directory}