Fork me on GitHub

codenarc:codenarc

Note:This goal should be used as a Maven report.

Full name:

org.codehaus.mojo:codenarc-maven-plugin:0.22-1:codenarc

Description:

Create a CodeNarc Report.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • Binds by default to the lifecycle phase: site.

Required Parameters

Name Type Since Description
outputDirectory File - Location where generated html will be created.
Default value is: ${project.reporting.outputDirectory}.
sourceDirectory File - Specifies the location of the source directory to be used for CodeNarc.
Default value is: ${project.build.sourceDirectory}.
xmlOutputDirectory File - Specifies the directory where the xml output will be generated.
Default value is: ${project.build.directory}.

Optional Parameters

Name Type Since Description
codeNarcVersion String - The CodeNarc version to use for the plugin
Default value is: 0.22.
excludes String - The comma-separated list of Ant-style file patterns specifying files that must be excluded. See the CodeNarc Command-Line Parameters for the default behavior.
groovyVersion String - The Groovy version to use for the plugin
Default value is: 1.7.5.
includes String - The comma-separated list of Ant-style file patterns specifying files that must be included. See the CodeNarc Command-Line Parameters for the default behavior.
log4jConfigFile String - The CodeNarc log4j config file. Each path may be optionally prefixed by any of the valid java.net.URL prefixes, such as "file:" (to load from a relative or absolute filesystem path), or "http:".
log4jVersion String - The log4j version to use for the plugin
Default value is: 1.2.13.
maxHeap int - Maximum Java heap size in megabytes (default=512).
Default value is: 512.
maxPriority1Violations int 0.17-2 The maximum number of priority 1 violations allowed before failing the build.
Default value is: -1.
maxPriority2Violations int 0.17-2 The maximum number of priority 2 violations allowed before failing the build.
Default value is: -1.
maxPriority3Violations int 0.17-2 The maximum number of priority 3 violations allowed before failing the build.
Default value is: -1.
rulesetfiles String - The CodeNarc rulesets to use. See the CodeNarc Rule Index for a list of some included. Defaults to the "rulesets/basic.xml,rulesets/exceptions.xml,rulesets/imports.xml"
skip boolean - Skip entire check.
Default value is: false.

Parameter Details

codeNarcVersion:

The CodeNarc version to use for the plugin
  • Type: java.lang.String
  • Required: No
  • Expression: ${codenarc.codenarc.version}
  • Default: 0.22

excludes:

The comma-separated list of Ant-style file patterns specifying files that must be excluded. See the CodeNarc Command-Line Parameters for the default behavior.
  • Type: java.lang.String
  • Required: No
  • Expression: ${codenarc.excludes}

groovyVersion:

The Groovy version to use for the plugin
  • Type: java.lang.String
  • Required: No
  • Expression: ${codenarc.groovy.version}
  • Default: 1.7.5

includes:

The comma-separated list of Ant-style file patterns specifying files that must be included. See the CodeNarc Command-Line Parameters for the default behavior.
  • Type: java.lang.String
  • Required: No
  • Expression: ${codenarc.includes}

log4jConfigFile:

The CodeNarc log4j config file. Each path may be optionally prefixed by any of the valid java.net.URL prefixes, such as "file:" (to load from a relative or absolute filesystem path), or "http:".
  • Type: java.lang.String
  • Required: No
  • Expression: ${codenarc.log4jConfigFile}

log4jVersion:

The log4j version to use for the plugin
  • Type: java.lang.String
  • Required: No
  • Expression: ${codenarc.log4j.version}
  • Default: 1.2.13

maxHeap:

Maximum Java heap size in megabytes (default=512).
  • Type: int
  • Required: No
  • Expression: ${codenarc.maxHeap}
  • Default: 512

maxPriority1Violations:

The maximum number of priority 1 violations allowed before failing the build.
  • Type: int
  • Since: 0.17-2
  • Required: No
  • Expression: ${codenarc.maxPriority1Violations}
  • Default: -1

maxPriority2Violations:

The maximum number of priority 2 violations allowed before failing the build.
  • Type: int
  • Since: 0.17-2
  • Required: No
  • Expression: ${codenarc.maxPriority2Violations}
  • Default: -1

maxPriority3Violations:

The maximum number of priority 3 violations allowed before failing the build.
  • Type: int
  • Since: 0.17-2
  • Required: No
  • Expression: ${codenarc.maxPriority3Violations}
  • Default: -1

outputDirectory:

Location where generated html will be created.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.reporting.outputDirectory}

rulesetfiles:

The CodeNarc rulesets to use. See the CodeNarc Rule Index for a list of some included. Defaults to the "rulesets/basic.xml,rulesets/exceptions.xml,rulesets/imports.xml"
  • Type: java.lang.String
  • Required: No
  • Expression: ${codenarc.rulesetfiles}

skip:

Skip entire check.
  • Type: boolean
  • Required: No
  • Expression: ${codenarc.skip}
  • Default: false

sourceDirectory:

Specifies the location of the source directory to be used for CodeNarc.
  • Type: java.io.File
  • Required: Yes
  • Default: ${project.build.sourceDirectory}

xmlOutputDirectory:

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