feat(internal/librarian/java): source google-cloud-pom-parent in pom.xml templates#6432
Open
zhumin8 wants to merge 2 commits into
Open
feat(internal/librarian/java): source google-cloud-pom-parent in pom.xml templates#6432zhumin8 wants to merge 2 commits into
zhumin8 wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces support for retrieving and using a separate parent POM version (google-cloud-pom-parent) instead of relying solely on the monorepo version (google-cloud-java). It adds a helper function findParentPOMVersion to extract this version from the configuration, updates the syncPOMs and collectModules signatures to accept and propagate the parent version, and updates the relevant POM templates and test files accordingly. I have no feedback to provide as there are no review comments.
zhumin8
commented
Jun 16, 2026
| // TODO(https://github.com/googleapis/librarian/issues/5529): remove returning version entries. | ||
| func syncPOMs(library *config.Library, libraryDir, monorepoVersion string, metadata *repoMetadata, transports map[string]serviceconfig.Transport) error { | ||
| modules, err := collectModules(library, libraryDir, monorepoVersion, metadata, transports) | ||
| func syncPOMs(library *config.Library, libraryDir, monorepoVersion, parentVersion string, metadata *repoMetadata, transports map[string]serviceconfig.Transport) error { |
Contributor
Author
There was a problem hiding this comment.
inputs are becoming too long to read. Filed #6439 to fix separately
f654e20 to
f086e7d
Compare
JoeWang1127
approved these changes
Jun 16, 2026
| return lib.Version, nil | ||
| } | ||
| } | ||
| return "", errParentVersion |
Contributor
There was a problem hiding this comment.
Could you add a test to verify the error case?
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.
Update logic to parse
google-cloud-pom-parentversion separately from librarian.yaml, and update pom.xml templates to use dedicated marker comment for "google-cloud-pom-parent" to match versions.txt (googleapis/google-cloud-java#13483).Note: This logic is added in parallel to existing "monorepoVersion" logic. Will do a followup to validate both config in
Validatestep and simplify logic when accessing these.For #6411