https://github.com/validator/maven-plugin
https://github.com/validator/maven-plugin
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/validator/maven-plugin
- Owner: validator
- License: mit
- Created: 2020-09-08T07:15:41.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-23T07:01:35.000Z (over 4 years ago)
- Last Synced: 2025-03-21T23:51:12.316Z (2 months ago)
- Language: Java
- Size: 24.4 KB
- Stars: 8
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# nvu-maven-plugin
maven plugin for HTML validation, using the [Nu Html Checker (v.Nu)](https://validator.github.io/)
The plugin can be configured to be run in the *valdiation* phase of the maven
build and cause the build to fail in case errors are reported.## Usage
Add the plugin to your pom.xml:
nu.validator
vnu-maven-plugin
1.0.0
validate
...
...
[...]
The configuration is also made in the pom.xml. There are defaults in place,
you only need to configure at least one fileset to point to the files to be
validated.The fileset configuration consists of a directory (relative to the maven
project root) and an optional ant glob directive to filter the contents of
the directory. Directories are scanned recursively by default. Example:
src/main/resources/templates
**.html
The validator can also be configured:
WARN
HTML
...
Here, all settings are optional.
### Handling warnings
By default, warnings are displayed as such and don't cause the build to
fail. It can be configured through the directive:- WARN (default) - show warnings
- IGNORE - supress warnings
- ERROR - treat as errors (affects filtering, see below)### Forcing file type
By default, the file type (html/xhtml, css, svg) is determined by the
file extension. Through the directive, it is possible to
force all files to be considered on of types HTML, CSS, SVG or XHTML.### Filtering
It is possible to filter warnings and/or errors based on (WARN,
ERROR, ALL, optional, default ALL) and a . Filtered items
are completely ignored. Mutiple filters can be configured. Example:
Duplicate ID "[a-zA-Z0-9.]*"
ERROR
## Additional (general) options
### Failfast
Fail on first error (default is to process all errors and fail in the end
if there are errors)true
### ASCII / Unicode quotes
By default, quotes in the errors messages will be displayed as ASCII quotes.
It is possible to switch to unicode quites by setting this option to 'false'false