File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -210,4 +210,58 @@ alternative support for serializing POJOs as XML and deserializing XML as pojos.
210210 </repository >
211211 </repositories >
212212
213+ <profiles >
214+ <profile >
215+ <!-- And different set up for JDK 17 -->
216+ <id >java17</id >
217+ <activation >
218+ <jdk >17</jdk >
219+ </activation >
220+ <build >
221+ <plugins >
222+ <plugin >
223+ <groupId >org.codehaus.mojo</groupId >
224+ <artifactId >build-helper-maven-plugin</artifactId >
225+ <executions >
226+ <execution >
227+ <id >add-test-source</id >
228+ <phase >generate-test-sources</phase >
229+ <goals >
230+ <goal >add-test-source</goal >
231+ </goals >
232+ <configuration >
233+ <sources >
234+ <source >src/test-jdk17/java</source >
235+ </sources >
236+ </configuration >
237+ </execution >
238+ </executions >
239+ </plugin >
240+ <plugin >
241+ <groupId >org.apache.maven.plugins</groupId >
242+ <artifactId >maven-compiler-plugin</artifactId >
243+ <inherited >true</inherited >
244+ <configuration >
245+ <!-- Enable Java 17 for all sources so that Intellij picks the right language level -->
246+ <source >17</source >
247+ <release >17</release >
248+ <compilerArgs >
249+ <arg >-parameters</arg >
250+ <arg >--add-opens=java.base/java.lang=ALL-UNNAMED</arg >
251+ <arg >--add-opens=java.base/java.util=ALL-UNNAMED</arg >
252+ </compilerArgs >
253+ </configuration >
254+ </plugin >
255+ <plugin >
256+ <groupId >org.apache.maven.plugins</groupId >
257+ <artifactId >maven-surefire-plugin</artifactId >
258+ <configuration >
259+ <argLine >--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED</argLine >
260+ </configuration >
261+ </plugin >
262+ </plugins >
263+ </build >
264+ </profile >
265+ </profiles >
266+
213267</project >
You can’t perform that action at this time.
0 commit comments