Skip to content

Commit 5b24ec4

Browse files
committed
Update pom.xml to reflect JDK 25 Vector API requirements and add necessary compiler arguments
1 parent 3400a85 commit 5b24ec4

File tree

1 file changed

+27
-4
lines changed

1 file changed

+27
-4
lines changed

pom.xml

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@
7272
<build>
7373
<plugins>
7474
<!-- Compiler: enable-preview for both JDKs.
75-
jdk.incubator.vector is added only for JDK21 (see jdk21 profile below).
76-
On JDK25 Vector API is stable; the add-modules flag is not needed. -->
75+
--add-modules jdk.incubator.vector is added per JDK profile (see below).
76+
The Vector API remains in jdk.incubator.vector on both JDK 21 and JDK 25
77+
(JEP 508 — 10th Incubator in JDK 25); the flag is required for all JDKs. -->
7778
<plugin>
7879
<groupId>org.apache.maven.plugins</groupId>
7980
<artifactId>maven-compiler-plugin</artifactId>
@@ -169,7 +170,8 @@
169170
Auto-activates for JDK 25.0.2+ builds (minimum required version).
170171
Publishes: gpu-llama3:${revision}-jdk25
171172
TornadoVM: 3.0.0-jdk25
172-
Vector API is stable in JDK25; add-modules jdk.incubator.vector not needed
173+
Vector API is still incubating in JDK 25 (JEP 508 — 10th Incubator);
174+
--add-modules jdk.incubator.vector is required for compilation.
173175
─────────────────────────────────────────────────────────────────────── -->
174176
<profile>
175177
<id>jdk25</id>
@@ -180,6 +182,21 @@
180182
<tornadovm.version>3.0.0-jdk25</tornadovm.version>
181183
<jdk.version.suffix>-jdk25</jdk.version.suffix>
182184
</properties>
185+
<build>
186+
<plugins>
187+
<plugin>
188+
<groupId>org.apache.maven.plugins</groupId>
189+
<artifactId>maven-compiler-plugin</artifactId>
190+
<configuration>
191+
<!-- Appended to enable-preview already in main build -->
192+
<compilerArgs combine.children="append">
193+
<arg>--add-modules</arg>
194+
<arg>jdk.incubator.vector</arg>
195+
</compilerArgs>
196+
</configuration>
197+
</plugin>
198+
</plugins>
199+
</build>
183200
</profile>
184201

185202
<profile>
@@ -205,7 +222,10 @@
205222
</executions>
206223
</plugin>
207224

208-
<!-- Javadocs with preview feature support -->
225+
<!-- Javadocs with preview feature support.
226+
--add-modules jdk.incubator.vector is required on all currently
227+
supported JDKs (21 and 25) because the Vector API remains in the
228+
incubator module (JEP 508 — 10th Incubator in JDK 25). -->
209229
<plugin>
210230
<groupId>org.apache.maven.plugins</groupId>
211231
<artifactId>maven-javadoc-plugin</artifactId>
@@ -215,9 +235,12 @@
215235
<release>${maven.compiler.source}</release>
216236
<additionalJOptions>
217237
<additionalJOption>--enable-preview</additionalJOption>
238+
<additionalJOption>--add-modules</additionalJOption>
239+
<additionalJOption>jdk.incubator.vector</additionalJOption>
218240
</additionalJOptions>
219241
<additionalOptions>
220242
<additionalOption>--enable-preview</additionalOption>
243+
<additionalOption>--add-modules jdk.incubator.vector</additionalOption>
221244
</additionalOptions>
222245
<failOnError>false</failOnError>
223246
<failOnWarnings>false</failOnWarnings>

0 commit comments

Comments
 (0)