8000 HV-1863 Test with Faisafe to test the MR jar · hibernate/hibernate-validator@6b9994a · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b9994a

Browse files
committed
HV-1863 Test with Faisafe to test the MR jar
Also adjust the test infrastructure to not rely on profile activation as it is not working very well.
1 parent e7514f3 commit 6b9994a

File tree

6 files changed

+83
-67
lines changed

6 files changed

+83
-67
lines changed

annotation-processor/pom.xml

Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,56 @@
121121
</execution>
122122
</executions>
123123
</plugin>
124+
<plugin>
125+
<groupId>org.apache.maven.plugins</groupId>
126+
<artifactId>maven-surefire-plugin</artifactId>
127+
<configuration>
128+
<skip>true</skip>
129+
</configuration>
130+
</plugin>
131+
<plugin>
132+
<groupId>org.apache.maven.plugins</groupId>
133+
<artifactId>maven-failsafe-plugin</artifactId>
134+
<configuration>
135+
<includes>
136+
<include>**/*Test.java</include>
137+
</includes>
138+
</configuration>
139+
<executions>
140+
<execution>
141+
<goals>
142+
<goal>integration-test</goal>
143+
<goal>verify</goal>
144+
</goals>
145+
</execution>
146+
</executions>
147+
</plugin>
148+
<plugin>
149+
<groupId>org.codehaus.mojo</groupId>
150+
<artifactId>build-helper-maven-plugin</artifactId>
151+
<executions>
152+
<execution>
153+
<id>add-test-source-java17</id>
154+
<phase>${java-version.test.java17.add-test-source-phase}</phase>
155+
<goals>
156+
<goal>add-test-source</goal>
157+
</goals>
158+
<configuration>
159+
<sources>
160+
<source>src/test/java17</source>
161+
</sources>
162+
</configuration>
163+
</execution>
164+
</executions>
165+
</plugin>
124166
</plugins>
125167
</build>
126168

127169
<profiles>
128170
<profile>
129-
<id>java14-mr-build</id>
171+
<id>java17-mr-build</id>
130172
<activation>
131-
<jdk>[14,)</jdk>
173+
<jdk>[17,)</jdk>
132174
</activation>
133175
<build>
134176
<plugins>
@@ -137,15 +179,15 @@
137179
<artifactId>maven-compiler-plugin</artifactId>
138180
<executions>
139181
<execution>
140-
<id>compile-java14</id>
182+
<id>compile-java17</id>
141183
<phase>compile</phase>
142184
<goals>
143185
<goal>compile</goal>
144186
</goals>
145187
<configuration>
146-
<release>14</release>
188+
<release>17</release>
147189
<compileSourceRoots>
148-
<compileSourceRoot>${project.basedir}/src/main/java14</compileSourceRoot>
190+
<compileSourceRoot>${project.basedir}/src/main/java17</compileSourceRoot>
149191
</compileSourceRoots>
150192
<multiReleaseOutput>true</multiReleaseOutput>
151193
</configuration>
@@ -155,36 +197,5 @@
155197
</plugins>
156198
</build>
157199
</profile>
158-
<profile>
159-
<id>testWithJdk17</id>
160-
<activation>
161-
<property>
162-
<name>java-version.test.release</name>
163-
<value>17</value>
164-
</property>
165-
</activation>
166-
<build>
167-
<plugins>
168-
<plugin>
169-
<groupId>org.codehaus.mojo</groupId>
170-
<artifactId>build-helper-maven-plugin</artifactId>
171-
<executions>
172-
<execution>
173-
<id>add-test-source</id>
174-
<phase>generate-test-sources</phase>
175-
<goals>
176-
<goal>add-test-source</goal>
177-
</goals>
178-
<configuration>
179-
<sources>
180-
<source>src/test/java17</source>
181-
</sources>
182-
</configuration>
183-
</execution>
184-
</executions>
185-
</plugin>
186-
</plugins>
187-
</build>
188-
</profile>
189200
</profiles>
190201
</project>

engine/pom.xml

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,24 @@
312312
<skip>false</skip>
313313
</configuration>
314314
</plugin>
315+
<plugin>
316+
<groupId>org.codehaus.mojo</groupId>
317+
<artifactId>build-helper-maven-plugin</artifactId>
318+
<executions>
319+
<execution>
320+
<id>add-test-source-java17</id>
321+
<phase>${java-version.test.java17.add-test-source-phase}</phase>
322+
<goals>
323+
<goal>add-test-source</goal>
324+
</goals>
325+
<configuration>
326+
<sources>
327+
<source>src/test/java17</source>
328+
</sources>
329+
</configuration>
330+
</execution>
331+
</executions>
332+
</plugin>
315333
</plugins>
316334
</build>
317335
<profiles>
@@ -327,36 +345,5 @@
327345
<surefire.jvm.args.illegal-access>--illegal-access=deny</surefire.jvm.args.illegal-access>
328346
</properties>
329347
</profile>
330-
<profile>
331-
<id>testWithJdk17</id>
332-
<activation>
333-
<property>
334-
<name>java-version.test.release</name>
335-
<value>17</value>
336-
</property>
337-
</activation>
338-
<build>
339-
<plugins>
340-
<plugin>
341-
<groupId>org.codehaus.mojo</groupId>
342-
<artifactId>build-helper-maven-plugin</artifactId>
343-
<executions>
344-
<execution>
345-
<id>add-test-source</id>
346-
<phase>generate-test-sources</phase>
347-
<goals>
348-
<goal>add-test-source</goal>
349-
</goals>
350-
<configuration>
351-
<sources>
352-
<source>src/test/java17</source>
353-
</sources>
354-
</configuration>
355-
</execution>
356-
</executions>
357-
</plugin>
358-
</plugins>
359-
</build>
360-
</profile>
361348
</profiles>
362349
</project>

pom.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@
283283
<!-- IMPORTANT: For Java 8, this must be the path to the JDK, not to the JRE -->
284284
<java-version.test.launcher.java_home>${java-version.test.compiler.java_home}</java-version.test.launcher.java_home>
285285
<java-version.test.launcher>${java-version.test.launcher.java_home}/bin/java</java-version.test.launcher>
286+
<java-version.test.java17.add-test-source-phase>generate-test-sources</java-version.test.java17.add-test-source-phase>
286287

287288
<!-- No need to build the javadocs per module. Aggregated javadocs are build in the distribution module. See also HV-894 -->
288289
<maven.javadoc.skip>true</maven.javadoc.skip>
@@ -1423,6 +1424,10 @@
14231424
<value>8</value>
14241425
</property>
14251426
</activation>
1427+
<properties>
1428+
<!-- Tests specific to Java 17+ won't work with JDK 8, so we disable them. -->
1429+
<java-version.test.java17.add-test-source-phase>none</java-version.test.java17.add-test-source-phase>
1430+
</properties>
14261431
<modules>
14271432
<!-- Only run the OSGi tests for JDK 8 -->
14281433
<module>osgi</module>
@@ -1454,6 +1459,19 @@
14541459
</pluginManagement>
14551460
</build>
14561461
</profile>
1462+
<profile>
1463+
<id>testWithJdk11</id>
1464+
<activation>
1465+
<property>
1466+
<name>java-version.test.release</name>
1467+
<value>11</value>
1468+
</property>
1469+
</activation>
1470+
<properties>
1471+
<!-- Tests specific to Java 17+ won't work with JDK 11, so we disable them. -->
1472+
<java-version.test.java17.add-test-source-phase>none</java-version.test.java17.add-test-source-phase>
1473+
</properties>
1474+
</profile>
14571475
<profile>
14581476
<id>testWithJdk11+</id>
14591477
<activation>

0 commit comments

Comments
 (0)
0