Skip to content

build(sdk-platform-java): Add formatter plugin to the root pom of sdk-platform-java.#12739

Open
blakeli0 wants to merge 1 commit intomainfrom
add-format-plugin
Open

build(sdk-platform-java): Add formatter plugin to the root pom of sdk-platform-java.#12739
blakeli0 wants to merge 1 commit intomainfrom
add-format-plugin

Conversation

@blakeli0
Copy link
Copy Markdown
Contributor

Running mvn fmt:format would result in errors in the root pom, because the formatter plugin was not migrated. Add formatter plugin to the root pom of sdk-platform-java to resolve the issue.

@blakeli0 blakeli0 requested a review from a team as a code owner April 10, 2026 03:56
@blakeli0 blakeli0 requested a review from diegomarquezp April 10, 2026 03:56
@blakeli0 blakeli0 changed the title build: Add formatter plugin to the root pom of sdk-platform-java. build(sdk-platform-java): Add formatter plugin to the root pom of sdk-platform-java. Apr 10, 2026
Copy link
Copy Markdown
Contributor

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

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 adds the fmt-maven-plugin to the root pom.xml with a skip configuration. The review feedback points out that this configuration will disable formatting across all submodules and recommends specifying a version for build reproducibility. It also suggests using false if the goal is to skip only the root POM and notes that the com.spotify.fmt plugin is no longer maintained, recommending a switch to the HubSpot alternative.

Comment on lines +32 to +38
<plugin>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
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.

medium

Adding the plugin with true in the root POM's section will be inherited by all submodules, effectively disabling the formatter for the entire project. Additionally, the plugin is missing a version, which is necessary for build reproducibility unless it is managed by a parent POM.

To resolve the errors at the root while allowing submodules to be formatted, you should:

  1. Specify a version (e.g., 2.9.1).
  2. Remove the true configuration. The plugin typically handles projects without Java source files (like this aggregator POM) gracefully. If you must skip it for the root only, use false.

Note: com.spotify.fmt is no longer maintained; com.hubspot.maven.plugins:fmt-maven-plugin is the recommended replacement for modern Java projects.

      <plugin>
        <groupId>com.spotify.fmt</groupId>
        <artifactId>fmt-maven-plugin</artifactId>
        <version>2.9.1</version>
      </plugin>
References
  1. Dependency versions in example code do not need to be kept strictly up-to-date with the latest version in the pull request.

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