Skip to content

Commit 5c5278d

Browse files
authored
Require at least Java 11 for building (#29)
Still target Java 8 for running Update plugins and dependencies
1 parent f810b46 commit 5c5278d

File tree

2 files changed

+10
-40
lines changed

2 files changed

+10
-40
lines changed

.github/workflows/maven.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
build:
3030
strategy:
3131
matrix:
32-
os: [ubuntu-latest, macos-latest, windows-latest] # Windows doe not yet work
33-
jdk: [8, 11, 17]
32+
os: [ubuntu-latest, macos-latest, windows-latest]
33+
jdk: [11, 17]
3434
include:
3535
# lengthy build steps should only be performed on linux with Java 11 (SonarQube analysis, deployment)
3636
- os: ubuntu-latest

pom.xml

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@
5252
<properties>
5353
<maven.version>3.5.4</maven.version>
5454
<java.target.version>8</java.target.version> <!-- used for compiler plugin, javadoc plugin and animal-sniffer, for compatibility reasons with Java 9 only the values 6,7,8 and 9 is allowed -->
55-
<maven.compiler.source>1.${java.target.version}</maven.compiler.source>
56-
<maven.compiler.target>1.${java.target.version}</maven.compiler.target>
55+
<maven.compiler.release>${java.target.version}</maven.compiler.release>
5756
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5857
<arguments /> <!-- additional arguments for the forked Maven run during releases -->
5958
</properties>
@@ -92,7 +91,7 @@
9291
<dependency>
9392
<groupId>org.junit.jupiter</groupId>
9493
<artifactId>junit-jupiter</artifactId>
95-
<version>5.7.0</version>
94+
<version>5.8.2</version>
9695
<scope>test</scope>
9796
</dependency>
9897
<dependency>
@@ -159,36 +158,28 @@
159158
</plugin>
160159
<plugin>
161160
<artifactId>maven-javadoc-plugin</artifactId>
162-
<version>3.2.0</version>
163-
<configuration>
164-
<source>8</source>
165-
</configuration>
161+
<version>3.3.1</version>
166162
</plugin>
167163
<plugin>
168164
<artifactId>maven-source-plugin</artifactId>
169165
<version>3.2.1</version>
170166
</plugin>
171167
<plugin>
172168
<artifactId>maven-release-plugin</artifactId>
173-
<version>3.0.0-M1</version>
169+
<version>3.0.0-M4</version>
174170
</plugin>
175171
<plugin>
176172
<artifactId>maven-dependency-plugin</artifactId>
177-
<version>3.1.2</version>
173+
<version>3.2.0</version>
178174
</plugin>
179175
<plugin>
180176
<artifactId>maven-enforcer-plugin</artifactId>
181177
<version>3.0.0-M3</version>
182178
</plugin>
183-
<plugin>
184-
<groupId>org.codehaus.mojo</groupId>
185-
<artifactId>animal-sniffer-maven-plugin</artifactId>
186-
<version>1.20</version>
187-
</plugin>
188179
<plugin>
189180
<groupId>org.apache.maven.plugins</groupId>
190181
<artifactId>maven-gpg-plugin</artifactId>
191-
<version>1.6</version>
182+
<version>3.0.1</version>
192183
</plugin>
193184
<plugin>
194185
<groupId>org.sonatype.plugins</groupId>
@@ -203,7 +194,7 @@
203194
<plugin>
204195
<groupId>org.jacoco</groupId>
205196
<artifactId>jacoco-maven-plugin</artifactId>
206-
<version>0.8.6</version>
197+
<version>0.8.7</version>
207198
</plugin>
208199
<plugin>
209200
<artifactId>maven-invoker-plugin</artifactId>
@@ -224,7 +215,7 @@
224215
<configuration>
225216
<rules>
226217
<requireJavaVersion>
227-
<version>1.${java.target.version}</version>
218+
<version>11</version><!-- require at least Java 11 for building, but build for Java 8 -->
228219
</requireJavaVersion>
229220
<requireMavenVersion>
230221
<version>${maven.version}</version>
@@ -234,27 +225,6 @@
234225
</execution>
235226
</executions>
236227
</plugin>
237-
<!-- check with animal sniffer (http://www.mojohaus.org/animal-sniffer/), should only be used in JDKs prior version 9 -->
238-
<plugin>
239-
<groupId>org.codehaus.mojo</groupId>
240-
<artifactId>animal-sniffer-maven-plugin</artifactId>
241-
<configuration>
242-
<signature>
243-
<groupId>org.codehaus.mojo.signature</groupId>
244-
<artifactId>java1${java.target.version}</artifactId>
245-
<version>1.0</version>
246-
</signature>
247-
</configuration>
248-
<executions>
249-
<execution>
250-
<id>check-java-compatibility</id>
251-
<phase>process-classes</phase>
252-
<goals>
253-
<goal>check</goal>
254-
</goals>
255-
</execution>
256-
</executions>
257-
</plugin>
258228
<plugin>
259229
<groupId>org.apache.maven.plugins</groupId>
260230
<artifactId>maven-invoker-plugin</artifactId>

0 commit comments

Comments
 (0)