Skip to content

Commit 2160e54

Browse files
authored
Move rest of JDK17 tests into main test dir (#4831)
1 parent 708d7f3 commit 2160e54

32 files changed

+32
-58
lines changed

pom.xml

+32-58
Original file line numberDiff line numberDiff line change
@@ -185,19 +185,27 @@
185185
<build>
186186
<plugins>
187187
<plugin>
188-
<groupId>org.jacoco</groupId>
189-
<artifactId>jacoco-maven-plugin</artifactId>
188+
<groupId>org.apache.maven.plugins</groupId>
189+
<artifactId>maven-compiler-plugin</artifactId>
190+
<inherited>true</inherited>
191+
<configuration>
192+
<compilerArgs>
193+
<!-- Must ensure parameter names compiled (for tests) -->
194+
<arg>-parameters</arg>
195+
</compilerArgs>
196+
</configuration>
197+
</plugin>
198+
199+
<plugin> <!-- default settings are fine, just need to enable here -->
200+
<!-- Inherited from oss-base. Generate PackageVersion.java.-->
201+
<groupId>com.google.code.maven-replacer-plugin</groupId>
202+
<artifactId>replacer</artifactId>
190203
<executions>
191204
<execution>
205+
<id>generate-package-version-java</id>
206+
<phase>prepare-package</phase>
192207
<goals>
193-
<goal>prepare-agent</goal>
194-
</goals>
195-
</execution>
196-
<execution>
197-
<id>report</id>
198-
<phase>test</phase>
199-
<goals>
200-
<goal>report</goal>
208+
<goal>replace</goal>
201209
</goals>
202210
</execution>
203211
</executions>
@@ -208,6 +216,8 @@
208216
<version>${version.plugin.surefire}</version>
209217
<artifactId>maven-surefire-plugin</artifactId>
210218
<configuration>
219+
<!-- Needed by some of the tests -->
220+
<argLine>--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED</argLine>
211221
<classpathDependencyExcludes>
212222
<exclude>javax.measure:jsr-275</exclude>
213223
</classpathDependencyExcludes>
@@ -233,34 +243,25 @@
233243
</configuration>
234244
</plugin>
235245

236-
<plugin> <!-- default settings are fine, just need to enable here -->
237-
<!-- Inherited from oss-base. Generate PackageVersion.java.-->
238-
<groupId>com.google.code.maven-replacer-plugin</groupId>
239-
<artifactId>replacer</artifactId>
246+
<plugin>
247+
<groupId>org.jacoco</groupId>
248+
<artifactId>jacoco-maven-plugin</artifactId>
240249
<executions>
241250
<execution>
242-
<id>generate-package-version-java</id>
243-
<phase>prepare-package</phase>
244251
<goals>
245-
<goal>replace</goal>
252+
<goal>prepare-agent</goal>
253+
</goals>
254+
</execution>
255+
<execution>
256+
<id>report</id>
257+
<phase>test</phase>
258+
<goals>
259+
<goal>report</goal>
246260
</goals>
247261
</execution>
248262
</executions>
249263
</plugin>
250264

251-
<!-- 17-Sep-2017, tatu: With 3.0 need to ensure parameter names compiled in
252-
-->
253-
<plugin>
254-
<groupId>org.apache.maven.plugins</groupId>
255-
<artifactId>maven-compiler-plugin</artifactId>
256-
<inherited>true</inherited>
257-
<configuration>
258-
<compilerArgs>
259-
<arg>-parameters</arg>
260-
</compilerArgs>
261-
</configuration>
262-
</plugin>
263-
264265
<plugin>
265266
<groupId>org.moditect</groupId>
266267
<artifactId>moditect-maven-plugin</artifactId>
@@ -332,35 +333,12 @@
332333
</goals>
333334
<configuration>
334335
<sources>
335-
<source>src/test-jdk11/java</source>
336336
<source>src/test-jdk17/java</source>
337337
</sources>
338338
</configuration>
339339
</execution>
340340
</executions>
341341
</plugin>
342-
<plugin>
343-
<groupId>org.apache.maven.plugins</groupId>
344-
<artifactId>maven-compiler-plugin</artifactId>
345-
<inherited>true</inherited>
346-
<configuration>
347-
<!-- Enable Java 17 for all sources so that Intellij picks the right language level -->
348-
<source>17</source>
349-
<release>17</release>
350-
<compilerArgs>
351-
<arg>-parameters</arg>
352-
<arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg>
353-
<arg>--add-opens=java.base/java.util=ALL-UNNAMED</arg>
354-
</compilerArgs>
355-
</configuration>
356-
</plugin>
357-
<plugin>
358-
<groupId>org.apache.maven.plugins</groupId>
359-
<artifactId>maven-surefire-plugin</artifactId>
360-
<configuration>
361-
<argLine>--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED</argLine>
362-
</configuration>
363-
</plugin>
364342
</plugins>
365343
</build>
366344
</profile>
@@ -384,8 +362,6 @@
384362
</goals>
385363
<configuration>
386364
<sources>
387-
<source>src/test-jdk11/java</source>
388-
<source>src/test-jdk17/java</source>
389365
<source>src/test-jdk21/java</source>
390366
</sources>
391367
</configuration>
@@ -402,8 +378,6 @@
402378
<release>21</release>
403379
<compilerArgs>
404380
<arg>-parameters</arg>
405-
<arg>--add-opens=java.base/java.lang=ALL-UNNAMED</arg>
406-
<arg>--add-opens=java.base/java.util=ALL-UNNAMED</arg>
407381
</compilerArgs>
408382
</configuration>
409383
</plugin>
@@ -508,7 +482,7 @@
508482
<path>
509483
<groupId>com.google.errorprone</groupId>
510484
<artifactId>error_prone_core</artifactId>
511-
<version>2.4.0</version>
485+
<version>2.36.0</version>
512486
</path>
513487
</annotationProcessorPaths>
514488
</configuration>

0 commit comments

Comments
 (0)