Skip to content

Commit c2b1cbd

Browse files
authored
Declare argLine for maven-surefire-plugin as property (#4995)
1 parent 56df8a9 commit c2b1cbd

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

pom.xml

+6-10
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@
380380
<activation>
381381
<jdk>17</jdk>
382382
</activation>
383+
<properties>
384+
<argLine>--add-opens=java.base/java.util=ALL-UNNAMED</argLine>
385+
</properties>
383386
<build>
384387
<plugins>
385388
<plugin>
@@ -417,9 +420,6 @@
417420
<plugin>
418421
<groupId>org.apache.maven.plugins</groupId>
419422
<artifactId>maven-surefire-plugin</artifactId>
420-
<configuration>
421-
<argLine>@{argLine} --add-opens=java.base/java.util=ALL-UNNAMED</argLine>
422-
</configuration>
423423
<executions>
424424
<execution>
425425
<id>type-pollution-test</id>
@@ -443,6 +443,9 @@
443443
<activation>
444444
<jdk>[21,)</jdk>
445445
</activation>
446+
<properties>
447+
<argLine>--add-opens=java.base/java.util=ALL-UNNAMED</argLine>
448+
</properties>
446449
<build>
447450
<plugins>
448451
<plugin>
@@ -478,13 +481,6 @@
478481
</compilerArgs>
479482
</configuration>
480483
</plugin>
481-
<plugin>
482-
<groupId>org.apache.maven.plugins</groupId>
483-
<artifactId>maven-surefire-plugin</artifactId>
484-
<configuration>
485-
<argLine>@{argLine} --add-opens=java.base/java.util=ALL-UNNAMED</argLine>
486-
</configuration>
487-
</plugin>
488484
</plugins>
489485
</build>
490486
</profile>

0 commit comments

Comments
 (0)