htmlSanityCheck
htmlSanityCheck copied to clipboard
Maven Plugin: sourceDocuments are not optional but required
According to the docs the sourceDocuments should be optional, but leaving them out in the Maven project (see below), leads to a runtime error:
[INFO] --- htmlsanitycheck:2.0.0-rc4:sanity-check (sanity-check-generated-docs) @ jigsaw-examples-docs ---
[INFO] ======================================================================
[INFO] Parameters given to sanityCheck plugin from Maven buildfile...
[INFO] Files to check : null
...
[INFO] Fail on errors : true
[INFO] Excludes : []
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.839 s
[INFO] Finished at: 2025-10-29T13:47:06+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.aim42.htmlSanityCheck:htmlSanityCheck-maven-plugin:2.0.0-rc4:sanity-check (sanity-check-generated-docs) on project jigsaw-examples-docs: org.aim42.htmlsanitycheck.MisconfigurationException: source documents must not be null -> [Help 1]
<plugin>
<groupId>org.aim42.htmlSanityCheck</groupId>
<artifactId>htmlSanityCheck-maven-plugin</artifactId>
<version>2.0.0-rc4</version>
<executions>
<execution>
<id>sanity-check-generated-docs</id>
<phase>verify</phase>
<goals>
<goal>sanity-check</goal>
</goals>
<configuration>
<sourceDir>${project.build.directory}/generated-docs</sourceDir>
<failOnErrors>true</failOnErrors>
</configuration>
</execution>
</executions>
</plugin>