jalopy:format

Format the java source files following a coding convention.

Mojo Attributes:

  • Requires a Maven 2.0 project to execute.
  • Automatically executes within the lifecycle phase: process-sources

Optional Parameters

Name Type Description
convention String Sets the preferences file to use - given either relative to the project's basedir or as an absolute local path or internet address. If omitted, the current preferences are used, if available. Otherwise the Jalopy built-in defaults will be used. Defaults to "${basedir}/src/main/resources/jalopy.xml".
failOnError boolean Indicates whether a run should be held if errors occured. Default value is true.
fileFormat String Sets the file format of the output files. The file format controls what end of line character is used. Either one of "UNIX", "DOS", "MAC", "DEFAULT" or "AUTO" can be used. The values are case insensitive. Default value is auto.
history String Specifies the history policy to use. Either one of "COMMENT", "FILE" or "NONE" can be used. Default value is none.
srcExcludesPattern String For Source Directory. Specifies filesets defining which source files not to format. This is a comma- or space-separated list of patterns of files. Default value is **\*.exc.
srcIncludesPattern String For Source Directory. Specifies filesets defining which source files to format. This is a comma- or space-separated list of patterns of files. Default value is **\*.java.
testExcludesPattern String For Test Directory. Specifies filesets defining which test source files not to format. This is a comma- or space-separated list of patterns of files. Default value is **\\*.exc.
testIncludesPattern String For Test Directory. Specifies filesets defining which test source files to format. This is a comma- or space-separated list of patterns of files. Default value is **\*.java.

Parameter Details

convention

Sets the preferences file to use - given either relative to the project's basedir or as an absolute local path or internet address. If omitted, the current preferences are used, if available. Otherwise the Jalopy built-in defaults will be used. Defaults to "${basedir}/src/main/resources/jalopy.xml".

  • Type: java.lang.String
  • Required: No
  • Expression: ${jalopy.convention}

failOnError Indicates whether a run should be held if errors occured.
  • Type: boolean
  • Required: No
  • Default: true

fileFormat Sets the file format of the output files. The file format controls what end of line character is used. Either one of "UNIX", "DOS", "MAC", "DEFAULT" or "AUTO" can be used. The values are case insensitive.
  • Type: java.lang.String
  • Required: No
  • Default: auto

history Specifies the history policy to use. Either one of "COMMENT", "FILE" or "NONE" can be used.
  • Type: java.lang.String
  • Required: No
  • Default: none

srcExcludesPattern For Source Directory. Specifies filesets defining which source files not to format. This is a comma- or space-separated list of patterns of files. Default value is **\*.exc.
  • Type: java.lang.String
  • Required: No
  • Expression: **\*.exc

srcIncludesPattern For Source Directory. Specifies filesets defining which source files to format. This is a comma- or space-separated list of patterns of files.
  • Type: java.lang.String
  • Required: No
  • Default: **\*.java

testExcludesPattern For Test Directory. Specifies filesets defining which test source files not to format. This is a comma- or space-separated list of patterns of files. Default value is **\\*.exc.
  • Type: java.lang.String
  • Required: No
  • Expression: **\*.exc

testIncludesPattern For Test Directory. Specifies filesets defining which test source files to format. This is a comma- or space-separated list of patterns of files.
  • Type: java.lang.String
  • Required: No
  • Default: **\*.java