From b46310ef89c49cfd13de1726cf29e68ab85cb41a Mon Sep 17 00:00:00 2001 From: Sylwester Lachiewicz Date: Fri, 8 Jan 2021 03:41:18 +0100 Subject: [PATCH] Set minimal default target/source/release for maven-compiler to Java 7 --- .../apache/maven/it/AbstractMavenIntegrationTestCase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java b/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java index 57426a6839..168101fdd6 100644 --- a/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java +++ b/its/core-it-support/maven-it-helper/src/main/java/org/apache/maven/it/AbstractMavenIntegrationTestCase.java @@ -590,13 +590,13 @@ public abstract class AbstractMavenIntegrationTestCase try { - // auto set source+target to lowest accepted value based on java version + // auto set source+target to lowest reasonable java version // Java9 requires at least 1.6 if ( VersionRange.createFromVersionSpec( "[9,12)" ).containsVersion( getJavaVersion() ) ) { - verifier.getSystemProperties().put( "maven.compiler.source", "1.6" ); - verifier.getSystemProperties().put( "maven.compiler.target", "1.6" ); - verifier.getSystemProperties().put( "maven.compiler.release", "6" ); + verifier.getSystemProperties().put( "maven.compiler.source", "1.7" ); + verifier.getSystemProperties().put( "maven.compiler.target", "1.7" ); + verifier.getSystemProperties().put( "maven.compiler.release", "7" ); } // Java12 requires at least 7 if ( VersionRange.createFromVersionSpec( "[12,)" ).containsVersion( getJavaVersion() ) )