macker:macker

Full name:

org.codehaus.mojo:macker-maven-plugin:1.0.0-SNAPSHOT:macker

Description:

Runs Macker against the compiled classes of the project.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Requires dependency resolution of artifacts in scope: compile.
  • Invokes the execution of the lifecycle phase compile prior to executing itself.

Required Parameters

Name Type Since Description
classesDirectory File - Directory containing the class files for Macker to analyze.
outputDirectory File - Directory where the Macker output file will be generated.
Default value is: ${project.build.directory}.
outputName String - Name of the Macker output file.
Default value is: macker-out.xml.
rulesDirectory File - Directory containing the rules files for Macker.
testClassesDirectory File - The directories containing the test-classes to be analyzed.

Optional Parameters

Name Type Since Description
anger String - Anger threshold. Valid options are error, warning, info, and debug.
excludes String[] - A list of files to exclude from checking. Can contain Ant-style wildcards and double wildcards. Note that these exclusion patterns only operate on the path of a source file relative to its source root directory. In other words, files are excluded based on their package and/or class name. If you want to exclude entire root directories, use the parameter excludeRoots instead.
failOnError boolean - Fail the build on an error.
Default value is: true.
includeTests boolean - Run Macker on the tests.
Default value is: false.
includes String[] - A list of files to include from checking. Can contain Ant-style wildcards and double wildcards. Defaults to **\/*.class.
maxmem String - Maximum memory to pass JVM of Macker processes.
Default value is: 64m.
maxmsg int - Print max messages.
Default value is: 0.
print String - Print threshold. Valid options are error, warning, info, and debug.
quiet boolean - Only output Macker errors, avoid info messages.
Default value is: false.
rule String - Name of the Macker rules file.
Default value is: macker-rules.xml.
rules String[] - Name of the Macker rules files.
skip boolean - Skip the checks. Most useful on the command line via "-Dmacker.skip=true".
Default value is: false.
variables Map - Variables map that will be passed to Macker.
verbose boolean - Verbose setting for Macker tool execution.
Default value is: false.

Parameter Details

anger:

Anger threshold. Valid options are error, warning, info, and debug.
  • Type: java.lang.String
  • Required: No
  • Expression: ${anger}

classesDirectory:

Directory containing the class files for Macker to analyze.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.outputDirectory}

excludes:

A list of files to exclude from checking. Can contain Ant-style wildcards and double wildcards. Note that these exclusion patterns only operate on the path of a source file relative to its source root directory. In other words, files are excluded based on their package and/or class name. If you want to exclude entire root directories, use the parameter excludeRoots instead.
  • Type: java.lang.String[]
  • Required: No

failOnError:

Fail the build on an error.
  • Type: boolean
  • Required: No
  • Default: true

includeTests:

Run Macker on the tests.
  • Type: boolean
  • Required: No
  • Default: false

includes:

A list of files to include from checking. Can contain Ant-style wildcards and double wildcards. Defaults to **\/*.class.
  • Type: java.lang.String[]
  • Required: No

maxmem:

Maximum memory to pass JVM of Macker processes.
  • Type: java.lang.String
  • Required: No
  • Expression: ${macker.maxmem}
  • Default: 64m

maxmsg:

Print max messages.
  • Type: int
  • Required: No
  • Expression: ${maxmsg}
  • Default: 0

outputDirectory:

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

outputName:

Name of the Macker output file.
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${outputName}
  • Default: macker-out.xml

print:

Print threshold. Valid options are error, warning, info, and debug.
  • Type: java.lang.String
  • Required: No
  • Expression: ${print}

quiet:

Only output Macker errors, avoid info messages.
  • Type: boolean
  • Required: No
  • Expression: ${quiet}
  • Default: false

rule:

Name of the Macker rules file.
  • Type: java.lang.String
  • Required: No
  • Expression: ${rule}
  • Default: macker-rules.xml

rules:

Name of the Macker rules files.
  • Type: java.lang.String[]
  • Required: No
  • Expression: ${rules}

rulesDirectory:

Directory containing the rules files for Macker.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${basedir}/src/main/config

skip:

Skip the checks. Most useful on the command line via "-Dmacker.skip=true".
  • Type: boolean
  • Required: No
  • Expression: ${macker.skip}
  • Default: false

testClassesDirectory:

The directories containing the test-classes to be analyzed.
  • Type: java.io.File
  • Required: Yes
  • Expression: ${project.build.testOutputDirectory}

variables:

Variables map that will be passed to Macker.
  • Type: java.util.Map
  • Required: No
  • Expression: ${variables}

verbose:

Verbose setting for Macker tool execution.
  • Type: boolean
  • Required: No
  • Expression: ${verbose}
  • Default: false