ITADN

adventure 5.x cannot be consumed via Maven (POM points to non-existent jar)

#1420Opensvaningelgem 创建于 2026-05-12
S
svaningelgemcommented
Adventure 5.x is not consumable via Maven — only via Gradle. This is a regression from the 4.x line, which resolves cleanly from both. ## Repro $ curl -s -o /dev/null -w "%{http_code}\n" https://repo.maven.apache.org/maven2/net/kyori/adventure-api/5.1.0/adventure-api-5.1.0.pom 200 $ curl -s -o /dev/null -w "%{http_code}\n" https://repo.maven.apache.org/maven2/net/kyori/adventure-api/5.1.0/adventure-api-5.1.0.jar 404 $ curl -s -o /dev/null -w "%{http_code}\n" https://repo.maven.apache.org/maven2/net/kyori/adventure-api/5.1.0/adventure-api-5.1.0-patched.jar 200 Concretely, any Maven build that pulls `adventure-text-minimessage:5.1.0` fails with: Could not find artifact net.kyori:adventure-api:jar:5.1.0 in <repo> even though Maven Central serves the POM with a 200. ## Root cause The POM at `.../adventure-api-5.1.0.pom` declares the artifact as a normal `jar` packaging (no classifier), so Maven resolves it to `adventure-api-5.1.0.jar` — which is 404. The real jar is published as `adventure-api-5.1.0-patched.jar`. This classifier is only declared in the Gradle Module Metadata (`.module` file), which Maven does not read: { "variants": [ { "name": "apiElements", "files": [ { "name": "adventure-api-5.1.0-patched.jar", ... } ] } ] } So Gradle resolves correctly via `.module`; Maven follows the POM into a 404. This affects `adventure-api`, and likely other 5.x modules that go through paperweight remapping. `adventure-text-minimessage:5.1.0` itself ships an unclassified jar that Maven can find, but its transitive dep on `adventure-api:5.1.0` breaks the resolution. ## Possible fixes 1. Publish the main artifact at the canonical `adventure-api-X.Y.Z.jar` URL (with or without paperweight remapping — whichever is the intended Maven-consumer artifact), and use a classifier for the non-default variant. 2. Alternatively, document Adventure 5.x as Gradle-only and update packaging metadata so Maven users get a clearer error than a bare 404. Happy to provide more detail or test a candidate publication. Thanks for your work on Adventure!
0 条评论