consistent maven configuration


Maven 3.3.1 included some improvements to allow project specific JVM and command line options, documented in the release notes. Using this it is very easy to maintain consistency between local and CI builds.

Here’s an example of the configuration I would typically use for .mvn/maven.config



And something like this for .mvn/jvm.config


Bear in mind if you’re using containerised builds that any -Xmx option will override any -XX:+UseContainerSupport calculated limits. The JVM is container aware by default since Java 10, and with the -XX:+UseContainerSupport option since Java 8u191.

Also, IntelliJ has an issue where it is unable to detect successful builds when org.slf4j.simpleLogger.showDateTime=true is in effect. If you happen to use IntelliJ then you might want to avoid using this option until that issue is resolved.