This project uses Spotless for code formatting and license header management.
- Applies Apache 2.0 license headers to all Java files (from
license-header.txt) - Removes unused imports
- Trims trailing whitespace
- Ensures files end with a newline
mvn spotless:checkmvn spotless:applySpotless check runs automatically during the compile phase:
mvn compileIf the check fails, run mvn spotless:apply to fix formatting issues automatically.
The Spotless configuration is in pom.xml under the spotless-maven-plugin section. The license header template is in license-header.txt.
The license header is automatically applied to all Java files and includes:
- Copyright year (dynamically set to current year for new files)
- Apache License 2.0 reference
The template in license-header.txt uses $YEAR placeholder which Spotless replaces with the current year.