Skip to content

Commit 446f5c3

Browse files
committed
Exclude conformance tests from the Maven Central release build
mcp's module-info refers to sibling modules by their JPMS names, which only exist once those modules are packaged as jars. Before the package phase, the reactor passes bare target/classes directories, which can't be automatic modules. So mcp is compiled at prepare-package. javadoc:aggregate forks a compile-phase build of the whole reactor, so the fork never produces mcp classes. Modules that depend on mcp at compile scope (the conformance tests) then fall back to Maven Central, where the release version doesn't exist yet. The conformance tests are not deployed, so leave them out of the release build. Signed-off-by: Daniel Garnier-Moiroux <git@garnier.wf>
1 parent 3d161fb commit 446f5c3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎.github/workflows/maven-central-release.yml‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,15 @@ jobs:
3232
run: mvn -pl mcp-test -am -Pjackson2 test
3333

3434
# Deploy runs all previous maven goals, including test and verify
35+
# Conformance tests are not published, and they break javadoc:aggregate: its forked
36+
# compile lifecycle never produces mcp classes (compiled at prepare-package), so their
37+
# dependency on mcp falls back to Maven Central, where the release does not exist yet.
3538
- name: Publish to Maven Central
3639
run: |
3740
mvn --batch-mode \
3841
-Prelease \
3942
-Pjavadoc \
43+
-pl '!conformance-tests,!conformance-tests/client-jdk-http-client,!conformance-tests/client-spring-http-client,!conformance-tests/server-servlet' \
4044
clean deploy
4145
env:
4246
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}

0 commit comments

Comments
 (0)