Update custom layout sample so it builds with Java 9

Previously, the custom layout sample did not configure the source
and target for the compiler. This meant that both defaulted to 1.5
which is not supported by Java 9's javac. The oldest support version
is 1.6.

This commit sets the maven.compiler.source and maven.compiler.target
properties to 1.8 (the lowest version support by Boot 2.0) allowing
the sample to build with both Java 8 and Java 9.

See gh-10515
This commit is contained in:
Andy Wilkinson
2017-10-13 16:22:50 +01:00
parent 63b7591031
commit 162a48806e
2 changed files with 4 additions and 0 deletions

View File

@@ -6,6 +6,8 @@
<artifactId>custom</artifactId>
<version>0.0.1.BUILD-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>

View File

@@ -6,6 +6,8 @@
<artifactId>default</artifactId>
<version>0.0.1.BUILD-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>