Skip to content

New client generation script (pom.xml generation) should work with com.google.maps group ID #9125

@suztomo

Description

@suztomo

Related to #9045

The problem was found in #9119 (comment).

Survey

The pom.xml files' groupID is already using variable.

https://github.com/googleapis/synthtool/blob/83b8f9c243f22a20b86c9b3e19e8c214b69aea97/docker/owlbot/java/templates/poms/proto_pom.xml.j2#L5

  <modelVersion>4.0.0</modelVersion>
  <groupId>{{module.group_id}}</groupId>
  <artifactId>{{module.artifact_id}}</artifactId>

fix-pom.py uses .repo-metadata.json's distribution_name field to determine group_id: https://github.com/suztomo/synthtool/blob/082e1e2c9320ac4360b10024f0ded533000dfe28/docker/owlbot/java/src/fix-poms.py#L281

def main():
    with open(".repo-metadata.json", "r") as fp:
        repo_metadata = json.load(fp)

    group_id, artifact_id = repo_metadata["distribution_name"].split(":")

No, for grpc- and proto- modules, it's hardcoded https://github.com/googleapis/synthtool/blob/082e1e2c9320ac4360b10024f0ded533000dfe28/docker/owlbot/java/src/fix-poms.py#L349


    # Missing Case 2: There's a new proto-XXX and grpc-XXX directory. It's a new
    # version in the proto file to a library. Both a new library and existing
    # library.
    for path in glob.glob("proto-google-*"):
        if not path in existing_modules:
            existing_modules[path] = module.Module(
                group_id="com.google.api.grpc",
                artifact_id=path,
                version=main_module.version,
                release_version=main_module.release_version,
            )
            if path not in excluded_dependencies_list \
                    and path not in main_module.artifact_id:
                required_dependencies[path] = module.Module(
                    group_id="com.google.api.grpc",
                    artifact_id=path,
                    version=main_module.version,
                    release_version=main_module.release_version,
                )

Metadata

Metadata

Assignees

Labels

priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions