mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-04-24 11:22:48 +00:00
Add user friendly error when Java < 17 is used
Add an enforcer rule with a custom message to detect if the JVM version is too old
This commit is contained in:
parent
0962ed7e8f
commit
7b1abb3ca9
1 changed files with 20 additions and 0 deletions
20
pom.xml
20
pom.xml
|
@ -129,6 +129,26 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>enforce-java</id>
|
||||
<goals>
|
||||
<goal>enforce</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireJavaVersion>
|
||||
<message>This build requires at least Java ${java.version}, update your JVM, and run the build again</message>
|
||||
<version>${java.version}</version>
|
||||
</requireJavaVersion>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
|
|
Loading…
Reference in a new issue