Skip to content

feat: Use Jakarta BOM for Jakarta EE dependencies - #656

Closed
kabir wants to merge 2 commits into
a2aproject:mainfrom
kabir:boms
Closed

kabir wants to merge 2 commits into
a2aproject:mainfrom
kabir:boms

Conversation

@kabir

@kabir kabir commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @kabir, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request streamlines the management of Jakarta EE dependencies by leveraging the jakarta.jakartaee-bom. This change consolidates versioning and dependency declarations for Jakarta APIs, leading to a more maintainable and consistent build configuration. It also includes minor updates to test dependencies to ensure comprehensive testing support.

Highlights

  • Centralized Jakarta EE Dependency Management: The jakarta.jakartaee-bom has been introduced in boms/sdk/pom.xml to centralize the management of Jakarta EE dependencies, reducing boilerplate and ensuring consistent versions across the project.
  • Removed Individual Jakarta API Dependencies: Previously declared individual Jakarta API dependencies (CDI, Inject, JSON, JAX-RS) and their version properties have been removed from both boms/sdk/pom.xml and the root pom.xml, as they are now managed by the imported Jakarta EE BOM.
  • Updated Test Dependencies: New test dependencies, junit-jupiter and mockito-junit-jupiter, have been explicitly added to boms/sdk/pom.xml to enhance testing capabilities.
Changelog
  • boms/sdk/pom.xml
    • Added jakarta.jakartaee-bom to the import scope for centralized Jakarta EE dependency management.
    • Removed individual Jakarta API dependencies (CDI, Inject, JSON, JAX-RS) that are now managed by the BOM.
    • Added com.google.code.gson dependency.
    • Added junit-jupiter and mockito-junit-jupiter test dependencies.
  • pom.xml
    • Removed individual version properties for Jakarta API dependencies (CDI, Inject, JSON, JAX-RS).
    • Added jakarta.platform.version property to define the version for the Jakarta Platform BOM.
    • Removed individual Jakarta API dependencies from the main project's dependency management section.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@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 refactors dependency management to use the Jakarta EE BOM, which is a great improvement for consistency and maintainability. The changes correctly introduce jakarta.jakartaee-bom in the SDK's public BOM and rely on the existing quarkus-bom for the internal project build, cleaning up redundant version properties and explicit dependencies.

I've found one potential issue in the public a2a-java-sdk-bom where removing the explicit management for some Jakarta APIs also removes their scope=provided default, which could be a breaking change for consumers. A detailed comment with a suggestion is provided.

The other additions to the BOM (gson, junit-jupiter, mockito-junit-jupiter) are good enhancements for dependency management, even if slightly outside the scope of the main change.

Comment thread boms/sdk/pom.xml Outdated
<version>${gson.version}</version>
</dependency>

<!-- Jakarta APIs managed by Jakarta Platform BOM -->

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.

high

While using the Jakarta EE BOM is a good step, removing the explicit dependency declarations for jakarta.json-api and jakarta.ws.rs-api also removes their <scope>provided</scope>. The imported jakarta.jakartaee-bom only manages versions, not scopes. This means consumers of this BOM who depend on these APIs without specifying a scope will now get them with the default compile scope instead of provided. This is likely not the intended behavior and could be a breaking change for consumers of the SDK BOM.

It's recommended to retain the declarations for these APIs to enforce the correct scope, while letting the BOM manage the versions. You can re-add them without the <version> tag.

            <!-- Jakarta APIs managed by Jakarta Platform BOM -->
            <dependency>
                <groupId>jakarta.enterprise</groupId>
                <artifactId>jakarta.enterprise.cdi-api</artifactId>
            </dependency>
            <dependency>
                <groupId>jakarta.inject</groupId>
                <artifactId>jakarta.inject-api</artifactId>
            </dependency>
            <dependency>
                <groupId>jakarta.json</groupId>
                <artifactId>jakarta.json-api</artifactId>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>jakarta.ws.rs</groupId>
                <artifactId>jakarta.ws.rs-api</artifactId>
                <scope>provided</scope>
            </dependency>

@kabir kabir closed this Feb 16, 2026
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.

1 participant