revelc / formatter-maven-plugin

Formatter Maven Plugin

Home Page:https://code.revelc.net/formatter-maven-plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

formatter-maven-plugin

mvn verify Maven Central Apache License

This project provides a mechanism to automatically (re)format your Maven project during a Maven build, or to verify its formatting, so that your project can converge on consistent code style regardless of user preferences, IDE settings, etc.

It began following a post on the topic (which can be found here; thanks to John for writing such a helpful article). It now uses the Eclipse code formatter for Java, and has grown to support formatting of other file types as well.

For a companion m2e project configurator, see formatter-m2e-configurator.

This software is provided WITHOUT ANY WARRANTY, and is available under the Apache License, Version 2. Any code loss caused by using this plugin is not the responsibility of the author(s). Be sure to use some source repository management system such as GIT before using this plugin.

Contributions are welcome.

How to use

View the Maven plugin documentation for the latest release here.

Eclipse Compatibility

The primary use case of this plugin is to ensure consistent formatting for a project, regardless of differences between IDE preferences or IDE versions that developers use. Nevertheless, some users may find it useful to correlate versions of this plugin to the version of Eclipse whose code is used as the basis for this plugin's formatting. See the project website for a list of recent versions of this plugin and their corresponding Eclipse versions.

Integration Tests

mvn clean verify

JDK Requirements

  • 2.16.x requires jdk 8 as required by Eclipse binaries
  • 2.17.x and later requires jdk 11 as required by Eclipse binaries
  • 2.24.x and later requires jdk 17 as required by Eclipse binaries

About

Formatter Maven Plugin

https://code.revelc.net/formatter-maven-plugin

License:Apache License 2.0


Languages

Language:Java 60.2%Language:HTML 38.1%Language:Shell 1.2%Language:JavaScript 0.5%