From 7642fcb6d93dcb2ccb2caf931b340fd100ed8180 Mon Sep 17 00:00:00 2001 From: Alex Abashev Date: Fri, 25 Sep 2026 23:59:02 +0300 Subject: [PATCH] Show the released versions in the README 2.27.0.1 is on Maven Central, so the snippets name it instead of a VERSION placeholder, and they add open-java-format 2.98.0.4, the current formatter, which the documentation installs too. The new documentation link points at the Maven page of openjavaformat.dev, where every snippet was run against the published plugin. The Maven Central badge reads the version from maven-metadata.xml, as the formatter's README does: shields' maven-central endpoint shows nothing for this artifact. Requirements name only the JDK: 3.9.6 is the maven-plugin-api the plugin is built against, and Maven treats the descriptor's version as a recommendation. 2.27.0.1 formats on Maven 3.8.7 as well. --- README.md | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 6da36d9..3879f62 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,13 @@ [![Build Status](https://github.com/openjavaformat/fmt-maven-plugin/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/openjavaformat/fmt-maven-plugin/actions/workflows/ci.yml?query=branch%3Amain) [![license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](https://github.com/openjavaformat/fmt-maven-plugin/blob/main/LICENSE) -[![Maven Central](https://img.shields.io/maven-central/v/dev.openjavaformat/fmt-maven-plugin)](https://central.sonatype.com/artifact/dev.openjavaformat/fmt-maven-plugin) +[![Maven Central](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo1.maven.org%2Fmaven2%2Fdev%2Fopenjavaformat%2Ffmt-maven-plugin%2Fmaven-metadata.xml&label=Maven%20Central)](https://central.sonatype.com/artifact/dev.openjavaformat/fmt-maven-plugin) ## fmt-maven-plugin Formats your code using [open-java-format](https://openjavaformat.dev), a modern, lambda-friendly, 120-character Java formatter. +**Documentation: [openjavaformat.dev/get-started/maven](https://openjavaformat.dev/get-started/maven/)** + This is a fork of [spotify/fmt-maven-plugin](https://github.com/spotify/fmt-maven-plugin), which formats with google-java-format. It works the same way, with open-java-format in its place. The format cannot be configured by design. @@ -24,7 +26,7 @@ To have your sources automatically formatted on each build, add to your pom.xml: dev.openjavaformat fmt-maven-plugin - VERSION + 2.27.0.1 @@ -36,7 +38,7 @@ To have your sources automatically formatted on each build, add to your pom.xml: dev.openjavaformat open-java-format - 2.98.0.3 + 2.98.0.4 @@ -54,7 +56,7 @@ If you prefer, you can only check formatting at build time using the `check` goa dev.openjavaformat fmt-maven-plugin - VERSION + 2.27.0.1 @@ -66,7 +68,7 @@ If you prefer, you can only check formatting at build time using the `check` goa dev.openjavaformat open-java-format - 2.98.0.3 + 2.98.0.4 @@ -138,7 +140,7 @@ example: dev.openjavaformat fmt-maven-plugin - VERSION + 2.27.0.1 some/source/directory some/test/directory @@ -182,7 +184,7 @@ example to not display the non-compliant files: dev.openjavaformat fmt-maven-plugin - VERSION + 2.27.0.1 false @@ -205,7 +207,7 @@ example to limit the display up to 10 files dev.openjavaformat fmt-maven-plugin - VERSION + 2.27.0.1 10 @@ -228,7 +230,7 @@ example to only warn about non-compliant files instead of failing the build dev.openjavaformat fmt-maven-plugin - VERSION + 2.27.0.1 false @@ -259,7 +261,7 @@ You can pass parameters via standard `-D` syntax. ### Requirements -The plugin needs Maven 3.9.6 or newer, running on JDK 21 or newer: open-java-format is compiled for Java 21, and the plugin formats in a JVM started from the same JDK. +Maven has to run on JDK 21 or newer: open-java-format is compiled for Java 21, and the plugin formats in a JVM started from the same JDK. ### Building