<plugin>
<groupId>org.aim42.htmlSanityCheck</groupId>
<artifactId>htmlSanityCheck-maven-plugin</artifactId>
<version>2.0.0-rc3</version> (1)
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>sanity-check</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDocuments>
<file>src/file-to-test.html</file> (2)
</sourceDocuments>
<sourceDir>src</sourceDir> (3)
</configuration>
</plugin>
HSC Maven Plugin
The Maven plugin of HTML Sanity Check (HSC) enables to check generated or native HTML documentation from the Maven build.
Installation (Maven Plugin)
Default Installation
Use the following snippet inside a Maven build file:
1 | Checkout current version |
2 | List the files you want tio check here. |
3 | Directory where the HTML files are located. |
Latest (development) versions
|
Usage
This task exposes a few properties as part of its configuration:
sourceDir (mandatory)
|
Directory where the HTML files are located. Type: Directory. |
||
sourceDocuments (optional)
|
An override to process several source files, which may be a subset of all files available in Type: Default: All files in |
||
checkingResultsDir (optional)
|
Directory where the checking results written to. Type: Directory. Default: |
||
junitResultsDir (optional)
|
Directory where the results are written to in JUnit XML format. JUnit XML can be read by many tools, including CI environments. Type: Directory. Default: |
||
failOnErrors (optional)
|
Fail the build if any error was found in the checked pages. Type: Boolean. Default: |
||
httpConnectionTimeout (optional)
|
Timeout for http requests in ms. Type: Integer. Default: |
||
ignoreLocalHost (optional)
|
Ignore localhost as hostname. Type: Boolean. Default: |
||
ignoreIPAddresses (optional)
|
Ignore IP addresses as hostname. Type: Boolean. Default: |
||
checkerClasses (optional)
|
The set of checker classes to be executed. Type: List. Default: All available checker classes. Checker Classes
|
||
httpWarningCodes (optional)
|
Additional HTTP response codes treated as warning. Type: List. Default:
|
||
httpErrorCodes (optional)
|
Additional HTTP response codes treated as error. Type: List. Default:
|
||
httpSuccessCodes (optional)
|
Additional HTTP response codes treated as success. Type: List. Default:
|
Examples
Small Example
build.maven
tbd
Extended example
build.maven
tbd
Compatibility
The Plugin is only tested with Maven 3.9.x, but should also work with previous versions later than Maven 3.6.x.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.