Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set -release flag to java.level when running on JDK9+ & EOL java.level.test #230

Merged
merged 1 commit into from
Feb 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@

<!-- Starting from Jenkins 2.54 Jenkins supports Java 8 and since 2.164 it also supports java 11 -->
<java.level>8</java.level>
<!-- Change this property if you need your tests to be compiled with a different Java level than the plugin. -->
<!-- Use only if strictly necessary. It may cause problems in your IDE. -->
<java.level.test>${java.level}</java.level.test>

<spotbugs-maven-plugin.version>4.5.3.0</spotbugs-maven-plugin.version>
<spotbugs-annotations.version>4.5.3</spotbugs-annotations.version>
Expand Down Expand Up @@ -844,8 +841,8 @@
<configuration>
<source>1.${java.level}</source>
<target>1.${java.level}</target>
<testSource>1.${java.level.test}</testSource>
<testTarget>1.${java.level.test}</testTarget>
<testSource>1.${java.level}</testSource>
<testTarget>1.${java.level}</testTarget>
</configuration>
</plugin>
<plugin>
Expand All @@ -855,6 +852,23 @@
</build>

<profiles>
<profile>
<id>jdk-above-9</id>
<activation>
<jdk>[1.9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>${java.level}</release>
<testRelease>${java.level}</testRelease>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>always-check-remote-repositories</id>
<properties>
Expand Down