Skip to content

Commit 6dd2374

Browse files
Add Enforcer Plugin to Ensure Java 17 Build
Adds the maven-enforcer-plugin to ensure build with Java 17. Signed-off-by: Karsten Schnitter <k.schnitter@sap.com>
1 parent 66d2ea8 commit 6dd2374

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

pom.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
<log4j2.version>2.25.2</log4j2.version>
113113
<buildnumber.plugin.version>3.2.1</buildnumber.plugin.version>
114114
<compiler.plugin.version>3.14.1</compiler.plugin.version>
115+
<enforcer.plugin.version>3.6.2</enforcer.plugin.version>
115116
<source.plugin.version>3.3.1</source.plugin.version>
116117
<jar.plugin.version>3.4.2</jar.plugin.version>
117118
<hamcrest.version>1.3</hamcrest.version>
@@ -224,6 +225,26 @@
224225
<release>17</release>
225226
</configuration>
226227
</plugin>
228+
<plugin>
229+
<groupId>org.apache.maven.plugins</groupId>
230+
<artifactId>maven-enforcer-plugin</artifactId>
231+
<version>${enforcer.plugin.version}</version>
232+
<executions>
233+
<execution>
234+
<id>enforce-java-17</id>
235+
<goals>
236+
<goal>enforce</goal>
237+
</goals>
238+
<configuration>
239+
<rules>
240+
<requireJavaVersion>
241+
<version>17</version>
242+
</requireJavaVersion>
243+
</rules>
244+
</configuration>
245+
</execution>
246+
</executions>
247+
</plugin>
227248
</plugins>
228249
</build>
229250
<profiles>

0 commit comments

Comments
 (0)