Define compiler configuration with Maven properties where possible and use Java 11 built-in functionality instead of Animal Sniffer
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<project.build.outputEncoding>UTF-8</project.build.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ <maven.compiler.testSource>1.8</maven.compiler.testSource>
+ <maven.compiler.testTarget>1.8</maven.compiler.testTarget>
+ <!-- Generate metadata for reflection on method parameters -->
+ <maven.compiler.parameters>true</maven.compiler.parameters>
+
<releaseProfiles />
<arguments />
<argLine>-Xms768M -Xmx768M -XX:+HeapDumpOnOutOfMemoryError -XX:+TieredCompilation -XX:TieredStopAtLevel=1 @{jenkins.addOpens}</argLine>
<scmTag>HEAD</scmTag>
<!-- Where to put temporary files during test runs. -->
<surefireTempDir>${project.build.directory}/tmp</surefireTempDir>
-
- <!-- Generate metadata for reflection on method parameters -->
- <maven.compiler.parameters>true</maven.compiler.parameters>
</properties>
<dependencyManagement>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.2</version>
<configuration>
- <source>8</source>
<quiet>true</quiet>
<links>
<link>https://javadoc.jenkins.io/</link>
</execution>
</executions>
</plugin>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <testSource>1.8</testSource>
- <testTarget>1.8</testTarget>
- <!--
- Work around MCOMPILER-346.
- TODO When MCOMPILER-346 is resolved, this should be deleted.
- -->
- <forceJavacCompilerUse>true</forceJavacCompilerUse>
- </configuration>
- </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<activation>
<jdk>[1.9,)</jdk>
</activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <release>8</release>
- <testRelease>8</testRelease>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <properties>
+ <maven.compiler.release>8</maven.compiler.release>
+ <maven.compiler.testRelease>8</maven.compiler.testRelease>
+ <animal.sniffer.skip>true</animal.sniffer.skip>
+ <!-- Work around openjdk/jdk11u-dev#919. TODO When we upgrade to OpenJDK 11.0.16, this should be deleted. -->
+ <maven.compiler.forceJavacCompilerUse>true</maven.compiler.forceJavacCompilerUse>
+ </properties>
</profile>
<profile>
<id>jenkins-release</id>
