Fork me on GitHub

Parent POM for all MojoHaus hosted Apache Maven plugins and components.

Latest build status: GitHub CI


GitHub report

How to use the POM

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="" xmlns:xsi=""

Spotless - automatic code formatting

MojoHaus Parent POM contains configuration for spotless-maven-plugin with options:

  • palantir code formatter
  • imports order as:
    • javax
    • java
    • other imports
    • static import

In order to use spotless in your project, you should add to your pom.xml

Newer version of spotless requires JDK 11, so it must be add in profile unless your project requires 11 by default.



When spotless will be enabled, each build will be check according to correct code format.

To fix code, simply run:

mvn spotless:apply


You can use checkstyle in order to verify code on each build.

Checkstyle can be enabled by adding to build/plugins`:


When you want to use checkstyle together with spotless, please add:


Big code reformat

After applying bigger reformatting it is recommended to add or update a .git-blame-ignore-revs file in the root of the repository containing a line with the SHA1 of the formatting commit to ignore those changes when using git blame (or equivalent concepts).

This is automatically considered by GitHub and can optionally be considered with local git blame

Latest releases

… may be found at Maven Central.

Deploy site to github

To deploy a site to github using maven-scm-publish-plugin:

cd target/checkout
mvn -Preporting verify site-deploy