xml-format:xml-check
Full name:
com.github.hazendaz.maven:xml-format-maven-plugin:4.1.1:xml-check
Description:
Finds the XML files in a project and only check them: no files are changed, but the build will fail if any file does not follow the formatting conventions.
Attributes:
- Requires a Maven project to be executed.
- The goal is thread-safe and supports parallel builds.
- Binds by default to the lifecycle phase:
process-sources.
Optional Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<attributeQuoteChar> |
char |
- |
Quote character to use when writing attributes. Default: "User Property: attributeQuoteChar |
<encoding> |
String |
- |
The encoding format. Default: UTF-8User Property: encoding |
<excludes> |
String[] |
- |
A set of file patterns that allow you to exclude certain files/folders from the formatting. In addition to these exclusions, the project build directory (typically target) is always excluded if skipTargetFolder is true.User Property: excludes |
<expandEmptyElements> |
boolean |
- |
Whether or not to expand empty elements to <tagName></tagName>. Default: falseUser Property: expandEmptyElements |
<includes> |
String[] |
- |
A set of file patterns that dictate which files should be included in the formatting with each file pattern being relative to the base directory. User Property: includes |
<indentSize> |
int |
- |
Indicates the number of spaces to apply when indenting. Default: 2User Property: indentSize |
<keepBlankLines> |
boolean |
- |
Whether to keep blank lines. A maximum of one line is preserved between each tag. Default: falseUser Property: keepBlankLines |
<lineEnding> |
LineEnding |
- |
Sets the line-ending of files after formatting. Valid values are:
lineSeparator has its default value. Do not set any value for lineSeparator.Default: LFUser Property: lineEnding |
<lineSeparator> |
String |
- |
Deprecated. Please do not set this value; use lineEnding insteadNew line separator. Default:
User Property: lineSeparator |
<newLineAfterDeclaration> |
boolean |
- |
Whether or not to print new line after the XML declaration. Default: falseUser Property: newLineAfterDeclaration |
<newLineAfterNTags> |
int |
- |
Controls when to output a line.separator every so many tags in case of no lines and total text trimming. Default: 0User Property: newLineAfterNTags |
<newlines> |
boolean |
- |
The default new line flag, set to do new lines only as in original document. Default: trueUser Property: newlines |
<omitEncoding> |
boolean |
- |
Whether or not to output the encoding in the XML declaration. Default: falseUser Property: omitEncoding |
<padText> |
boolean |
- |
Pad string-element boundaries with whitespace. Default: falseUser Property: padText |
<skip> |
boolean |
- |
Skip XML formatting. Default: falseUser Property: xml-format.skip |
<skipTargetFolder> |
boolean |
- |
In addition to the exclusions, the project build directory (typically target) is always excluded if true.Default: trueUser Property: skipTargetFolder |
<suppressDeclaration> |
boolean |
- |
Whether or not to suppress the XML declaration. Default: falseUser Property: suppressDeclaration |
<tabIndent> |
boolean |
- |
Use tabs instead of spaces for indents. If set to true, indentSize will be ignored.Default: falseUser Property: tabIndent |
<trimText> |
boolean |
- |
Should we preserve whitespace or not in text nodes. Default: trueUser Property: trimText |
<xhtml> |
boolean |
- |
Whether or not to use XHTML standard. Default: falseUser Property: xhtml |
Parameter Details
<attributeQuoteChar>
Quote character to use when writing attributes.
- Type:
char - Required:
No - User Property:
attributeQuoteChar - Default:
"
<encoding>
The encoding format.
- Type:
java.lang.String - Required:
No - User Property:
encoding - Default:
UTF-8
<excludes>
A set of file patterns that allow you to exclude certain files/folders from the formatting. In addition to these exclusions, the project build directory (typically
target) is always excluded if skipTargetFolder is true.- Type:
java.lang.String[] - Required:
No - User Property:
excludes
<expandEmptyElements>
Whether or not to expand empty elements to <tagName></tagName>.
- Type:
boolean - Required:
No - User Property:
expandEmptyElements - Default:
false
<includes>
A set of file patterns that dictate which files should be included in the formatting with each file pattern being relative to the base directory.
- Type:
java.lang.String[] - Required:
No - User Property:
includes
<indentSize>
Indicates the number of spaces to apply when indenting.
- Type:
int - Required:
No - User Property:
indentSize - Default:
2
<keepBlankLines>
Whether to keep blank lines. A maximum of one line is preserved between each tag.
- Type:
boolean - Required:
No - User Property:
keepBlankLines - Default:
false
<lineEnding>
Sets the line-ending of files after formatting. Valid values are:
- "SYSTEM" - Use line endings of current system
- "LF" - Use Unix and Mac style line endings
- "CRLF" - Use DOS and Windows style line endings
- "CR" - Use early Mac style line endings
lineSeparator has its default value. Do not set any value for lineSeparator.- Type:
au.com.acegi.xmlformat.LineEnding - Required:
No - User Property:
lineEnding - Default:
LF
<lineSeparator>
Deprecated.
Please do not set this value; use
Please do not set this value; use
lineEnding insteadNew line separator.
- Type:
java.lang.String - Required:
No - User Property:
lineSeparator - Default:
<newLineAfterDeclaration>
Whether or not to print new line after the XML declaration.
- Type:
boolean - Required:
No - User Property:
newLineAfterDeclaration - Default:
false
<newLineAfterNTags>
Controls when to output a line.separator every so many tags in case of no lines and total text trimming.
- Type:
int - Required:
No - User Property:
newLineAfterNTags - Default:
0
<newlines>
The default new line flag, set to do new lines only as in original document.
- Type:
boolean - Required:
No - User Property:
newlines - Default:
true
<omitEncoding>
Whether or not to output the encoding in the XML declaration.
- Type:
boolean - Required:
No - User Property:
omitEncoding - Default:
false
<padText>
Pad string-element boundaries with whitespace.
- Type:
boolean - Required:
No - User Property:
padText - Default:
false
<skip>
Skip XML formatting.
- Type:
boolean - Required:
No - User Property:
xml-format.skip - Default:
false
<skipTargetFolder>
In addition to the exclusions, the project build directory (typically
target) is always excluded if true.- Type:
boolean - Required:
No - User Property:
skipTargetFolder - Default:
true
<suppressDeclaration>
Whether or not to suppress the XML declaration.
- Type:
boolean - Required:
No - User Property:
suppressDeclaration - Default:
false
<tabIndent>
Use tabs instead of spaces for indents. If set to
true, indentSize will be ignored.- Type:
boolean - Required:
No - User Property:
tabIndent - Default:
false
<trimText>
Should we preserve whitespace or not in text nodes.
- Type:
boolean - Required:
No - User Property:
trimText - Default:
true
<xhtml>
Whether or not to use XHTML standard.
- Type:
boolean - Required:
No - User Property:
xhtml - Default:
false
