google-java-format VS fmt-maven-plugin

Compare google-java-format vs fmt-maven-plugin and see what are their differences.

google-java-format

Reformats Java source code to comply with Google Java Style. (by google)

fmt-maven-plugin

Opinionated Maven Plugin that formats your Java code. (by spotify)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
google-java-format fmt-maven-plugin
21 2
5,416 307
0.5% 1.0%
8.6 6.6
3 days ago 16 days ago
Java Java
GNU General Public License v3.0 or later MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

google-java-format

Posts with mentions or reviews of google-java-format. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-04-12.

fmt-maven-plugin

Posts with mentions or reviews of fmt-maven-plugin. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-03-09.
  • Zero Config Code Formatter?
    11 projects | /r/java | 9 Mar 2022
    https://github.com/spotify/fmt-maven-plugin (formerly coveo) both to format before commit and to check on ci that the formatting is correct.
  • What java formatter do you use for formatting source code?
    3 projects | /r/java | 23 Jul 2021
    Coveo is another one that's easier to set up because /drumroll - there are no configurations at all. It uses the google java format which, as /u/dpash pointed out in his response has 2 space indentation and comically short lines. I'm not advocating 300 line lengths or anything, but google's style is very rigid in that regard. I've actually gotten used to the 2 space thing.

What are some alternatives?

When comparing google-java-format and fmt-maven-plugin you can also consider the following projects:

spotless - Keep your code spotless

palantir-java-format - A modern, lambda-friendly, 120 character Java formatter.

styleguide - Style guides for Google-originated open-source projects

spring-javaformat

formatter-maven-plugin - Formatter Maven Plugin

black - The uncompromising Python code formatter

prettier-java - Prettier Java Plugin

coc.nvim - Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.