Skip to content

Attach sources and javadoc on every package - #61

Merged
ghedwards merged 1 commit into
masterfrom
claude/attach-sources-javadoc-60
Aug 13, 2026
Merged

Attach sources and javadoc on every package#61
ghedwards merged 1 commit into
masterfrom
claude/attach-sources-javadoc-60

Conversation

@ghedwards

Copy link
Copy Markdown

Closes #60.

maven-source-plugin and maven-javadoc-plugin lived in the deploy profile, which has no <activation> block, so they only ran under an explicit -P deploy. maven-publish.yml runs a plain mvn deploy, so attach-sources and attach-javadocs never fired — every artifact cfparser has published is a bare jar with no IDE source attachment and no javadoc.

Why not just add -P deploy to the workflow

The same profile carries maven-gpg-plugin, bound to verify. There is no signing key in CI, so passing the profile would have traded missing jars for a broken publish.

Moving the two attach plugins into the main <build> and leaving GPG behind separates the two concerns properly: artifact completeness is not a signing decision, and the workflow needs no change at all.

Cost, measured rather than assumed

I flagged in #60 that option 1 costs build time and was worth measuring first:

Time
mvn package -DskipTests 19.3s
mvn package -DskipTests -P deploy (source + javadoc) 23.2s

About 4 seconds. Both plugins bind to package, so mvn test is untouched — verified, neither goal appears in a mvn test run. The loop developers and CI run most often pays nothing; only package/install/deploy do, which are exactly the operations that should produce complete artifacts.

Verification

Plain mvn deploy against a local file repository, no -P deploy passed, at both version shapes:

cfml.dictionary-…-javadoc.jar
cfml.dictionary-…-sources.jar
cfml.dictionary-….jar
cfml.parsing-…-javadoc.jar
cfml.parsing-…-sources.jar
cfml.parsing-….jar
cfparser-….pom

The parent correctly ships only its .pom, which is right for pom packaging. GPG did not run, confirming the profile split holds.

  • 318 tests, ./gradlew build
  • Temporary release version reverted and mvn package re-run; all twelve version locations read 2.16.0-SNAPSHOT and the diff is pom.xml alone

Two smaller things in the same block

Versions pinned to 3.4.0 and 3.12.0 — the versions already resolving from the superpom, so this changes nothing today but stops the build moving underneath itself. maven-gpg-plugin beside them was already pinned at 3.2.4. Given this repo's history with versions drifting between declarations, leaving two unpinned plugins in the main build seemed worth closing off.

Dropped <additionalparam>-Xdoclint:none</additionalparam>. That parameter was removed in maven-javadoc-plugin 3.x, so it has been silently doing nothing — javadoc has been running with doclint on, and passing. Deleting dead config keeps behaviour exactly as it is today. Replacing it with the modern <doclint>none</doclint> would have been the tempting move and is the wrong one: it would newly relax checks that currently pass.


Generated by Claude Code

maven-source-plugin and maven-javadoc-plugin lived in the deploy profile,
which has no activation block, so they only ran with an explicit -P deploy.
maven-publish.yml runs a plain mvn deploy, so the attach-sources and
attach-javadocs executions never fired and every artifact cfparser has
published is a bare jar with no source attachment and no javadoc.

Adding -P deploy to the workflow would not have worked: the same profile
carries maven-gpg-plugin bound to verify, and there is no signing key in CI,
so the publish would have started failing instead. Moving the two attach
plugins into the main build and leaving GPG behind in the profile separates
the two concerns -- artifact completeness is not a signing decision.

Both bind to the package phase, so mvn test is untouched. Measured cost on
package is 19.3s to 23.2s.

Versions pinned to the 3.4.0 and 3.12.0 that were already resolving from the
superpom, so the build stops moving underneath itself. maven-gpg-plugin
beside them was already pinned.

Dropped <additionalparam>-Xdoclint:none</additionalparam>. That parameter was
removed in maven-javadoc-plugin 3.x, so it has been silently doing nothing and
javadoc has been running with doclint on and passing. Deleting dead config
keeps behaviour exactly as it is today; replacing it with <doclint>none</doclint>
would newly relax checks that currently pass.

Closes #60
@ghedwards
ghedwards merged commit bb55166 into master Aug 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Published artifacts carry no sources or javadoc jars

2 participants