Skip to content

Instantly share code, notes, and snippets.

@bondolo
Created August 29, 2018 21:01
Show Gist options
  • Save bondolo/822dec14bea0080243d87e00b45fc846 to your computer and use it in GitHub Desktop.
Save bondolo/822dec14bea0080243d87e00b45fc846 to your computer and use it in GitHub Desktop.
profile snippet from parent pom for configuring release with compiler on jdk >= 9
<profile>
<id>Java 9+ configuration</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- Use -release compiler option rather than source/target if 9+ -->
<release>${maven.compiler.target}</release>
</configuration>
</plugin>
</plugins>
</build>
<activation>
<jdk>[1.9,)</jdk>
</activation>
</profile>
</profiles>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment