Skip to content

feat(internal/librarian): populate Java Maven coordinates from defaults - #6554

Merged
JoeWang1127 merged 32 commits into
mainfrom
feat/group-id-mapping
Jul 1, 2026
Merged

feat(internal/librarian): populate Java Maven coordinates from defaults#6554
JoeWang1127 merged 32 commits into
mainfrom
feat/group-id-mapping

Conversation

@JoeWang1127

@JoeWang1127 JoeWang1127 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

The library configuration loader is updated to automatically populate Java Maven coordinates (GroupID and ArtifactID) based on API path prefix mappings defined in default configuration.

When a library's Java module configuration is missing or its GroupID is empty, the loader scans the library's API paths against the default api_path_to_group_id map to resolve the appropriate GroupID and sets the ArtifactID using the standard "google-" naming convention.

Add default mappings in follow up PRs.

For #6513

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for mapping API paths to Java group IDs by adding the api_path_to_group_id configuration field and implementing the fillJava function to populate Java-specific defaults (ArtifactID and GroupID) based on matching API path prefixes. The review feedback highlights several critical issues in the fillJava implementation, including non-deterministic prefix matching due to map iteration, potential false matches from path boundary issues, overwriting of existing ArtifactIDs, and the omission of defaulting GenerateGRPC to true. A refactored version of fillJava was suggested to address these concerns.

Comment thread internal/librarian/library.go
@JoeWang1127
JoeWang1127 marked this pull request as ready for review June 27, 2026 13:59
@JoeWang1127
JoeWang1127 requested a review from a team as a code owner June 27, 2026 13:59
@JoeWang1127
JoeWang1127 requested a review from zhumin8 June 27, 2026 13:59
Comment thread internal/librarian/library.go Outdated
Comment thread internal/librarian/library.go Outdated
Comment thread internal/config/language.go Outdated
@JoeWang1127
JoeWang1127 requested a review from zhumin8 June 29, 2026 18:22
Comment thread internal/librarian/library_test.go Outdated
@JoeWang1127
JoeWang1127 requested a review from ianthehat June 30, 2026 20:28
Comment thread internal/librarian/library.go Outdated
Comment thread internal/librarian/library.go Outdated
Comment thread internal/librarian/library.go Outdated
@JoeWang1127
JoeWang1127 requested a review from ianthehat July 1, 2026 00:04

@ianthehat ianthehat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One very minor comment, cl is good apart from that.

Comment thread internal/librarian/library.go Outdated
@JoeWang1127
JoeWang1127 requested a review from ianthehat July 1, 2026 15:25
@JoeWang1127
JoeWang1127 enabled auto-merge (squash) July 1, 2026 18:17
@JoeWang1127
JoeWang1127 merged commit accb8ad into main Jul 1, 2026
52 checks passed
@JoeWang1127
JoeWang1127 deleted the feat/group-id-mapping branch July 1, 2026 18:17
quirogas pushed a commit that referenced this pull request Jul 1, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.24.0](v0.23.0...v0.24.0)
(2026-07-01)


### Features

* **add:** handle Release Please config for google-cloud-node
([#6569](#6569))
([1f8ee00](1f8ee00))
* **internal/librarian/java:** add code snippet extraction helpers for
README rendering
([#6593](#6593))
([96f6925](96f6925)),
closes [#6515](#6515)
* **internal/librarian/java:** add extractSamples for README generation
([#6578](#6578))
([b5e3d45](b5e3d45)),
closes [#6515](#6515)
* **internal/librarian/nodejs:** add metadata_name_override and
name_pretty_override support
([#6603](#6603))
([3f6cfed](3f6cfed)),
closes [#6453](#6453)
* **internal/librarian:** add debug command with env subcommand
([#6576](#6576))
([027103b](027103b)),
closes [#6374](#6374)
* **internal/librarian:** populate Java Maven coordinates from defaults
([#6554](#6554))
([accb8ad](accb8ad)),
closes [#6513](#6513)
* **librarian/swift:** use discovery config
([#6604](#6604))
([5a44ed7](5a44ed7))
* **sidekick/discovery:** signatures without path params
([#6588](#6588))
([bb40e83](bb40e83))


### Bug Fixes

* **internal/librarian/java:** exclude google-cloud-bom and
libraries-bom when generating gapic-libraries-bom/pom.xml
([#6601](#6601))
([b8e50a5](b8e50a5))
* **internal/serviceconfig:** normalize transport name for Java
repo-metadata
([#6582](#6582))
([e20f77a](e20f77a))
* **sdk.yaml:** allow rust for many non-cloud apis
([#6598](#6598))
([0efb6e7](0efb6e7))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants