Skip to content

Commit 162a488

Browse files
committed
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 spring-projectsgh-10515
1 parent 63b7591 commit 162a488

File tree

2 files changed

+4
-0
lines changed
  • spring-boot-samples/spring-boot-sample-custom-layout/src/it

2 files changed

+4
-0
lines changed

spring-boot-samples/spring-boot-sample-custom-layout/src/it/custom/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<artifactId>custom</artifactId>
77
<version>0.0.1.BUILD-SNAPSHOT</version>
88
<properties>
9+
<maven.compiler.source>1.8</maven.compiler.source>
10+
<maven.compiler.target>1.8</maven.compiler.target>
911
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1012
</properties>
1113
<build>

spring-boot-samples/spring-boot-sample-custom-layout/src/it/default/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<artifactId>default</artifactId>
77
<version>0.0.1.BUILD-SNAPSHOT</version>
88
<properties>
9+
<maven.compiler.source>1.8</maven.compiler.source>
10+
<maven.compiler.target>1.8</maven.compiler.target>
911
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1012
</properties>
1113
<build>

0 commit comments

Comments
 (0)