Skip to content

Run javadoc for pre-26 NMS modules on the JDK 21 toolchain - #178

Merged
Travja merged 1 commit into
devfrom
claude/nms-javadoc-toolchain
Oct 23, 2026
Merged

Travja merged 1 commit into
devfrom
claude/nms-javadoc-toolchain

Conversation

@Travja

@Travja Travja commented Oct 23, 2026

Copy link
Copy Markdown
Collaborator

Release Build #20 got past the compile fix from #177, then failed at maven-javadoc-plugin:jar (attach-javadocs) for codex-nms-v1_20_1. On JDK 25, javadoc reads type annotations from the Spigot jar just like javac does, and hits the same error:

spigot-1.20.1-R0.1-SNAPSHOT.jar(/net/minecraft/server/level/WorldServer.class): error: Cannot attach type annotations @javax.annotation.Nullable to WorldServer.a:
  class file for com.mojang.datafixers.util.Pair not found

This PR gives maven-javadoc-plugin the same jdkToolchain (${nms.jdk}) that the compiler already has in codex-nms/pom.xml. Pre-26 modules now run javadoc on JDK 21, and 26.x modules still use 25.

Tested locally: I reproduced CI's classpath by excluding datafixerupper from the v1_20_1 Spigot dependency and building with -P publish on JDK 25 with toolchains for 21 and 25.

  • Before this change: the build fails at attach-javadocs with the error above.
  • After it: the log shows Toolchain in maven-javadoc-plugin: JDK[…java-21…], the javadoc jar is built, and the build succeeds.

The same "Cannot attach type annotations" line still shows up during lombok's delombok step. It's non-fatal and was already there before this change.


Generated by Claude Code

JDK 22+ javadoc fails on the type annotations in the older Spigot jars the same way
javac did (missing datafixerupper classes), which broke the 1.2.0 release at
attach-javadocs for codex-nms-v1_20_1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Secz6aiBJ7U8im8tnYhyLA
@Travja Travja added the build:patch label Oct 23, 2026 — with Claude
@Travja
Travja merged commit 491cd59 into dev Oct 23, 2026
2 of 3 checks passed
@Travja
Travja deleted the claude/nms-javadoc-toolchain branch October 24, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants