fix(build): pin javadoc strictness so a -D flag cannot silence it (#205) - #206
Merged
Merged
Conversation
maven-javadoc-plugin binds failOnError/skip/doclint to Maven USER PROPERTIES, and a property only supplies the value when the POM does not. Left unset, `-Dmaven.javadoc.failOnError=false` on any mvn command line (including publish.yml's real deploy) silences javadoc without touching a file in the repo, invisible to both existing guards. A POM <configuration> value takes precedence over the property, so pinning makes the override impossible rather than merely detectable. The #203 sweep is extended to REQUIRE the pin, because deleting it restores the overridable state without introducing any permissive value.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #205
Summary
This pins the javadoc strictness configuration so it cannot be overridden via Maven command-line flags. The
-Dmaven.javadoc.failOnError=falseflag could silently suppress javadoc errors during deployment without any repo-side indication.Evidence
The hole, reproduced first. Broken
{@link}in Rift.java +./mvnw -Prelease ... -Dmaven.javadoc.failOnError=false→ exit 0 (silenced). With the pin → exit 1. Also defeated:-Dmaven.javadoc.skip=true,-Ddoclint=none,-Dmaven.javadoc.skippedModules=....Prevention, not detection. This is the 4th issue in the chain #197 → #200 → #203 → #205; the first three all added detection. Pinning removes the vector instead.
The sweep now requires the pin, because deleting it reopens the hole WITHOUT introducing any permissive value — the same self-concealing shape as the rest of the chain.
Three escapes found by adversarial review, each confirmed behaviourally before fixing:
<configuration combine.self="override">at PLUGIN level — stripped the pin from the executing entry while the inert pluginManagement copy still showed it; checker exited 0.-DgaveBUILD SUCCESSwith 2×reference not foundin the log, and the checker printed "confirmed".<phase>none</phase>unbindingattach-javadocs— javadoc never runs, so the pin is never consulted (milder: yields no javadoc jar, loud at deploy rather than silent).Fixes: entries are tagged executing vs pluginManagement; the pin is required on every executing entry AND every execution's own
<configuration>; a new check requires some execution to actually bind thejargoal to a real phase.Verification:
--self-testnow covers 31 cases and runs in CI before the sweep. Real 11-module reactor: allpinned=True jar-bound=True. Clean build still succeeds (doclint=alldoes not promote the repo's existing missing-tag warnings to errors). Both embedded modules confirmed to inherit the pin into their executing entry../mvnw validatepasses. The #200 canary and #203 sweep both still pass.Docs
CONTRIBUTING.md gains a "The pin" section and two stale sentences describing these values as defaults were corrected.