build(wrapper): the graph-compose coordinate publishes an API reference - #494
Merged
Conversation
The only javadoc.io link in the repository points at `graph-compose`, and that module has no sources of its own. maven-javadoc-plugin's jar goal does not build an empty archive in that case — it builds none, and attaches nothing. Every 2.x release of the coordinate therefore shipped without a -javadoc.jar, and javadoc.io, which falls back to the newest version that carries one, kept serving the 1.9.1 API under the title "latest": complete, convincing, two majors stale, and sitting beside prose that promised documentation fresh after each Central release. The jar is now built from the engine's sources, which is the surface a caller of this coordinate authors against. Lombok is fed to the javadoc classpath explicitly because it is provided-scope in the engine and does not arrive transitively; doc lint is off, matching the engine's own release jar; failOnError is not, so an aggregation that breaks fails the publish instead of quietly reproducing the empty state that caused this. PublishedJavadocCoordinateGuardTest fails when a coordinate the docs advertise as an API reference cannot produce a javadoc jar, and the release checklist builds the wrapper's before a cut. README and CONTRIBUTING say which version the hosted page reflects until 2.1.1 lands. ./mvnw -B -ntp clean verify — BUILD SUCCESS. The release build now yields graph-compose-2.1.1-SNAPSHOT-javadoc.jar: 1024 entries, 903 HTML pages, including com/demcha/compose/document/api/DocumentSession.html titled "DocumentSession (GraphCompose 2.1.1-SNAPSHOT API)". Where it was 404. The guard was confirmed red first, by turning includeDependencySources off.
Owner
Author
|
Rebased onto Applied the three review points:
Left as a follow-up, as you suggested: the CI pre-check that actually builds the wrapper's javadoc jar and asserts its contents. The static guard covers configuration; only a real build covers the artifact.
|
DemchaAV
force-pushed
the
docs/javadoc-coordinate
branch
from
August 3, 2026 12:47
96642ac to
04c73ab
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
javadoc.io/doc/io.github.demchaav/graph-composeis the only API-reference link in the repository — README.md Distribution block and CONTRIBUTING.md release flow both point there. It rendersgraph-compose 1.9.1 javadoc.The cause is not a broken link.
wrapper/has no sources, and maven-javadoc-plugin'sjargoal does not build an empty archive in that case — it builds none and attaches nothing. Running the exact release profile the publish workflow runs printsNo Javadoc in project. Archive not created., and Central agrees:graph-compose-2.1.0-javadoc.jar→ 404, whilegraph-compose-core-2.1.0-javadoc.jar→ 200. javadoc.io falls back to the newest version that carries one, which is 1.9.1. So the page is not empty — it is a complete, convincing API reference for a version two majors old, presented as current, next to prose promising documentation fresh after each Central release.Repointing the link at
graph-compose-corewas the obvious fix and is worse: javadoc.io has indexed no 2.x coordinate —-core,-render-pdf,-templates,-testingall returnNo versions in the database. That trades a stale page for an empty one.What changed
wrapper/pom.xml— theattach-javadocsexecution setsincludeDependencySourcesoverio.github.demchaav:graph-compose-core, so the jar is built from the engine's sources: the surface a caller of this coordinate actually authors against.render-pdfis deliberately excluded — it is the backend the wrapper carries, not the API the caller writes.additionalDependencies. It isprovided-scope in the engine and so never arrives transitively; without it the build stops atpackage lombok does not exist. Its version is a second literal, soVersionConsistencyGuardTest.wrapperJavadocLombokVersionTracksTheEngineholds it in lockstep withcore/pom.xml— the drift would surface only during a release build.doclintis off, matching the engine's own release jar.failOnError=falseis removed. That flag is what let the empty state ship silently; a hard failure must now fail the publish.PublishedJavadocCoordinateGuardTest(new) — every coordinate the docs advertise as an API reference must resolve to a module that will produce a javadoc jar: own sources, orincludeDependencySources. It reads build files, so it stays offline and deterministic.Verification
./mvnw -B -ntp clean verify—BUILD SUCCESS, exit 0, 692 tests in the closing module.The release build now produces
wrapper/target/graph-compose-2.1.1-SNAPSHOT-javadoc.jar, 3.17 MB: 1024 entries, 903 HTML pages, includingcom/demcha/compose/GraphCompose.html,com/demcha/compose/document/api/DocumentSession.html(titledDocumentSession (GraphCompose 2.1.1-SNAPSHOT API),buildPdfpresent),DocumentDsl.htmlandDocumentTextStyle.html. Before this commit the goal attached nothing.The guard was confirmed red first: flipping
includeDependencySourcesto false reportsgraph-compose (wrapper) has no sources of its own and does not set includeDependencySources.Publish-order check: publish.yml:188 deploys the engine with
-P release, which attaches sources and installs them locally, before :210 builds the wrapper — so the aggregation resolves.Known limit
The wrapper's release profile is not exercised by ordinary CI, so a broken aggregation still surfaces at publish time rather than on a PR. It surfaces loudly now, which is the change that matters: with
failOnErrorback at its default the publish fails instead of shipping a coordinate with no API reference. A CI pre-check would catch it earlier and is worth a follow-up if you want it.Lane: build. No production code, no public API.