Set minimal default target/source/release for maven-compiler to Java 7

This commit is contained in:
Sylwester Lachiewicz 2021-01-08 03:41:18 +01:00
parent 36d9f925c4
commit b46310ef89
1 changed files with 4 additions and 4 deletions

View File

@ -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() ) )