|
72 | 72 | <build> |
73 | 73 | <plugins> |
74 | 74 | <!-- 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. --> |
77 | 78 | <plugin> |
78 | 79 | <groupId>org.apache.maven.plugins</groupId> |
79 | 80 | <artifactId>maven-compiler-plugin</artifactId> |
|
169 | 170 | Auto-activates for JDK 25.0.2+ builds (minimum required version). |
170 | 171 | Publishes: gpu-llama3:${revision}-jdk25 |
171 | 172 | 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. |
173 | 175 | ─────────────────────────────────────────────────────────────────────── --> |
174 | 176 | <profile> |
175 | 177 | <id>jdk25</id> |
|
180 | 182 | <tornadovm.version>3.0.0-jdk25</tornadovm.version> |
181 | 183 | <jdk.version.suffix>-jdk25</jdk.version.suffix> |
182 | 184 | </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> |
183 | 200 | </profile> |
184 | 201 |
|
185 | 202 | <profile> |
|
205 | 222 | </executions> |
206 | 223 | </plugin> |
207 | 224 |
|
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). --> |
209 | 229 | <plugin> |
210 | 230 | <groupId>org.apache.maven.plugins</groupId> |
211 | 231 | <artifactId>maven-javadoc-plugin</artifactId> |
|
215 | 235 | <release>${maven.compiler.source}</release> |
216 | 236 | <additionalJOptions> |
217 | 237 | <additionalJOption>--enable-preview</additionalJOption> |
| 238 | + <additionalJOption>--add-modules</additionalJOption> |
| 239 | + <additionalJOption>jdk.incubator.vector</additionalJOption> |
218 | 240 | </additionalJOptions> |
219 | 241 | <additionalOptions> |
220 | 242 | <additionalOption>--enable-preview</additionalOption> |
| 243 | + <additionalOption>--add-modules jdk.incubator.vector</additionalOption> |
221 | 244 | </additionalOptions> |
222 | 245 | <failOnError>false</failOnError> |
223 | 246 | <failOnWarnings>false</failOnWarnings> |
|
0 commit comments