ci: open the Javadoc jar before publishing it - #512
Merged
Conversation
DemchaAV
force-pushed
the
ci/wrapper-javadoc-artefact
branch
from
August 4, 2026 22:06
f3682bd to
e52f823
Compare
The existing Javadoc step lints the engine's sources. It cannot see whether the artefact Maven Central serves has anything in it, and that is the failure that happened: graph-compose carries no sources of its own, so the javadoc goal found nothing to archive and attached a jar with no pages. Every 2.x release shipped that way, javadoc.io kept rendering 1.9.1 because it was the newest version that carried a reference at all, and nothing in the build was red. PublishedJavadocCoordinateGuardTest guards the configuration. This guards the output: build the jar the release profile builds, then look inside it. Three pages stand in for the reference — the index a reader lands on, the entry point every snippet starts from, and the type they spend the rest of their time in. Checked from both sides rather than trusted because it passed: against the real jar all three are found, and against a probe jar carrying a manifest and one unrelated page the step reports each as missing and exits 1.
DemchaAV
force-pushed
the
ci/wrapper-javadoc-artefact
branch
from
August 4, 2026 22:14
e52f823 to
f99b45b
Compare
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.
Why
This is the last open item from the #493/#494 review follow-up, and the one the static
gate cannot cover.
graph-compose— the drop-in coordinate the README sends people to — carries no sourcesof its own. Its javadoc jar is built with
includeDependencySources, and when that findsnothing the goal logs "No Javadoc in project. Archive not created", attaches nothing,
and reports BUILD SUCCESS. Every 2.x release shipped an artefact with no pages, and
javadoc.io went on serving 1.9.1 — the newest version that carried an API reference at
all. Nothing was red, because linting sources and producing an artefact are different
things.
PublishedJavadocCoordinateGuardTestguards the configuration. Nothing guarded the output.What
One CI step, baseline JDK only: build the jar the release profile builds, then open it and
require
index.html,GraphCompose.htmlandDocumentSession.html— what a reader landson, what every snippet starts from, and the type they spend the rest of their time in.
It runs three passes, mirroring the order
publish.ymldeploys in, and the order is thefinding:
install -pl :graph-compose -amprofile-free — every module, including the engine'stests jar that
render-pdfneeds at test scope.install -pl :graph-compose-core -Prelease— adds the engine's sources jar, whichincludeDependencySourcesreads. It is release-profile-only, andreleasealso setsthe tests jar to phase
none, which is why this cannot be one pass.package -pl :graph-compose -Prelease— the wrapper's javadoc jar.publish.ymlgets there for free by deploying the engine before the wrapper, so thereleased artefact is fine; this reproduces that ordering rather than assuming it.
Tests
./mvnw -B -ntp clean verify→BUILD SUCCESS; the CI guards pass and the workflow parses.The first two attempts failed on CI, and both failures were worth having. The first
activated
releaseacross-amand brokerender-pdf's test-scope resolution. Thesecond dropped the profile from the dependency pass and produced no jar at all — which
is exactly the bug this step exists to catch, arriving on the step that catches it.
The second one passed locally for the wrong reason: my
~/.m2held the engine's sourcesjar from earlier release builds, and
wrapper/targetheld a staleapidocsthe jar goalarchived. Deleting both reproduced the CI failure on this machine — "No Javadoc in
project",
BUILD SUCCESS, no artefact — and the three-pass sequence then produced a1024-entry jar with all three pages from clean.
Also checked from the other side: a probe jar carrying a manifest and one unrelated page
is reported missing on all three and exits 1, and the absent-jar case now carries its own
message instead of a bare
lsfailure.The current artefact is healthy — the fix from #492/#494 works. This is the gate that
keeps it that way.