Want to build with Maven on Java 9? Here’s which versions to pick, how to use the compiler executable, toolchains, and mavenrc to run Maven on Java 9, and how to use mvn/jvm.config and profiles to configure your build for Java 8 and 9.
For a new project I decided to use Gradle. Here’s how I set it up with the incubating maven-publish plugin to publish snapshots to Sonatype’s repository.
With the second release the JDeps Maven Plugin allows the creation of flexible exemptions from build-breaking. This enables a self-paced migration away from dependencies of JDK-internal APIs that will be unavailable in Java 9.
The JDeps Maven Plugin will break a project’s build if it contains dependencies on JDK-internal APIs. This helps to prepare for Java 9, where these dependencies will be unaccessible.