Skip to content

Commit

Permalink
[JENKINS-54842] Define compiler configuration with Maven properties w…
Browse files Browse the repository at this point in the history
…here possible and use Java 11 built-in functionality instead of Animal Sniffer (#523)
  • Loading branch information
basil committed Mar 31, 2022
1 parent bdc1519 commit 943a57b
Showing 1 changed file with 15 additions and 29 deletions.
44 changes: 15 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@
<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>
Expand Down Expand Up @@ -112,9 +120,6 @@
<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>
Expand Down Expand Up @@ -340,7 +345,6 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<source>8</source>
<quiet>true</quiet>
<links>
<link>https://javadoc.jenkins.io/</link>
Expand Down Expand Up @@ -697,20 +701,6 @@
</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>
Expand Down Expand Up @@ -952,17 +942,13 @@
<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>
Expand Down

0 comments on commit 943a57b

Please sign in to comment.