[improve][build] Add validated API/SPI publication subset - #26579
Merged
Merged
Conversation
Add publishApiAndSpiOnly to select Java client, Functions and plugin dependencies for publication under a custom group. Validate the generated POM and Gradle metadata dependency closure before uploads and filter the BOM to the selected projects. Document ordinary and subset publishing, custom repositories, signing and credential configuration in build-logic/PUBLISHING.md. Include validation tests and retain configuration-cache and configure-on-demand support. Assisted-by: Codex
lhotari
requested review from
Technoboy-,
dao-jun,
david-streamlio,
merlimat,
nodece and
shibd
September 14, 2026 19:16
merlimat
approved these changes
Sep 14, 2026
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.
Motivation
Custom builds of the Pulsar Java clients, Functions and plugins need a complete set of API/SPI artifacts in the target Maven repository. Publishing the entire Pulsar project is unnecessary for this use case, while manually listing publish tasks can omit transitive dependencies. A custom Maven group also requires the BOM and internal published dependencies to use the same coordinates.
Modifications
-PpublishApiAndSpiOnly=truewith an explicit selection of 45 projects, including the ordinary and v5 Java clients and the dependencies needed for Functions and plugins.build-logic/PUBLISHING.md.Verifying this change
Added five TestNG tests for publication dependency validation, using the existing TestNG catalog dependency in build logic.
Local verification passed:
./gradlew spotlessCheck checkstyleMain checkstyleTestandquickCheck../gradlew -p build-logic :conventions:test.pulsar-commonfrom the selection fails validation with missing dependencies in POMs and Gradle metadata; restoring it passes.Does this pull request potentially affect one of the following parts: