This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Build Commands:
./mvnw clean spring-javaformat:apply compile # Compile application
./mvnw spring-javaformat:apply test # Run all tests- Package:
am.ik.maven.nullability- Main package
- Automatic configuration of ErrorProne and NullAway for nullability checking
- Lifecycle participant (
NullabilityLifecycleParticipant) injects compiler configuration before build plan is computed - No-op Mojo (
ConfigureMojo) atinitializephase for plugin declaration and parameter documentation - Configurable checking modes: MAIN, TESTS, DISABLED
- Support for
RequireExplicitNullMarkingcheck - Spring Contract and AssertJ
@Contractcustom contract annotations - Excludes test paths and generated sources by default
- Preserves existing
maven-compiler-pluginconfiguration - Integration tests via
maven-invoker-plugin
- Java 17+ (for compiling the plugin itself)
- JDK 21.0.8+ (OpenJDK) or JDK 22+ for running ITs. ErrorProne 2.43.0+ requires JDK 21+; NullAway JSpecify mode requires JDK 22+, or JDK 17.0.19+ / JDK 21.0.8+ with the
-XDaddTypeAnnotationsToSymbol=truejavac flag (the plugin adds this flag automatically). Oracle JDK 17/21 does not support this flag — use Liberica/Temurin/Zulu.
- No external dependencies except for testing libraries
- Use builder pattern if the number of arguments is more than two
- Write javadoc and comments in English
- Spring Java Format enforced via Maven plugin
- All code must pass formatting validation before commit
- Use Java 17 compatible features (avoid Java 21+ specific APIs)
- Use modern Java technics as much as possible like Java Records, Pattern Matching, Text Block etc ...
- Be sure to avoid circular references between classes and packages.
- Specify when this library should be used
- The explanations are written from the perspective of the API user, with plenty of code examples to make usage easy to understand.
- No need for excessive advertising
- There is no need to use emojis or flashy expressions, just write simply and honestly.
- JUnit 5 with AssertJ
- All tests must pass before completing tasks
- Code examples in the README must be tested to ensure they work.
- Ensure all code is formatted using
./mvnw spring-javaformat:apply - Run full test suite with
./mvnw verify - For every task, notify that the task is complete and ready for review by the following command:
osascript -e 'display notification "<Message Body>" with title "<Message Title>"’