Skip to content

Commit 6f979b2

Browse files
committed
use maven enforcer plugin for Java version
Added Maven Enforcer Plugin to enforce Java version.
1 parent 5d50959 commit 6f979b2

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,28 @@
263263

264264
<plugins> <!-- plugins inherited by all child POMs -->
265265

266+
<!-- Java version enforcer -->
267+
<plugin>
268+
<groupId>org.apache.maven.plugins</groupId>
269+
<artifactId>maven-enforcer-plugin</artifactId>
270+
<version>3.6.2</version>
271+
<executions>
272+
<execution>
273+
<id>enforce-java</id>
274+
<goals>
275+
<goal>enforce</goal>
276+
</goals>
277+
<configuration>
278+
<rules>
279+
<requireJavaVersion>
280+
<version>[21,)</version>
281+
</requireJavaVersion>
282+
</rules>
283+
</configuration>
284+
</execution>
285+
</executions>
286+
</plugin>
287+
266288
<!-- static analysis -->
267289
<plugin>
268290
<groupId>com.github.spotbugs</groupId>

0 commit comments

Comments
 (0)