Skip to content

Commit

Permalink
HV-1863 Test with Faisafe to test the MR jar
Browse files Browse the repository at this point in the history
Also adjust the test infrastructure to not rely on profile activation as
it is not working very well.
  • Loading branch information
gsmet committed May 4, 2022
1 parent 46c2828 commit 1db51b4
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 67 deletions.
83 changes: 47 additions & 36 deletions annotation-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,56 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source-java17</id>
<phase>${java-version.test.java17.add-test-source-phase}</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java17</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>java14-mr-build</id>
<id>java17-mr-build</id>
<activation>
<jdk>[14,)</jdk>
<jdk>[17,)</jdk>
</activation>
<build>
<plugins>
Expand All @@ -137,15 +179,15 @@
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile-java14</id>
<id>compile-java17</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>14</release>
<release>17</release>
<compileSourceRoots>
<compileSourceRoot>${project.basedir}/src/main/java14</compileSourceRoot>
<compileSourceRoot>${project.basedir}/src/main/java17</compileSourceRoot>
</compileSourceRoots>
<multiReleaseOutput>true</multiReleaseOutput>
</configuration>
Expand All @@ -155,36 +197,5 @@
</plugins>
</build>
</profile>
<profile>
<id>testWithJdk17</id>
<activation>
<property>
<name>java-version.test.release</name>
<value>17</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java17</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
49 changes: 18 additions & 31 deletions engine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,24 @@
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source-java17</id>
<phase>${java-version.test.java17.add-test-source-phase}</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java17</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
Expand All @@ -326,36 +344,5 @@
<surefire.jvm.args.illegal-access>--illegal-access=deny</surefire.jvm.args.illegal-access>
</properties>
</profile>
<profile>
<id>testWithJdk17</id>
<activation>
<property>
<name>java-version.test.release</name>
<value>17</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java17</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
18 changes: 18 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
<!-- IMPORTANT: For Java 8, this must be the path to the JDK, not to the JRE -->
<java-version.test.launcher.java_home>${java-version.test.compiler.java_home}</java-version.test.launcher.java_home>
<java-version.test.launcher>${java-version.test.launcher.java_home}/bin/java</java-version.test.launcher>
<java-version.test.java17.add-test-source-phase>generate-test-sources</java-version.test.java17.add-test-source-phase>

<!-- No need to build the javadocs per module. Aggregated javadocs are build in the distribution module. See also HV-894 -->
<maven.javadoc.skip>true</maven.javadoc.skip>
Expand Down Expand Up @@ -1368,6 +1369,10 @@
<value>8</value>
</property>
</activation>
<properties>
<!-- Tests specific to Java 17+ won't work with JDK 8, so we disable them. -->
<java-version.test.java17.add-test-source-phase>none</java-version.test.java17.add-test-source-phase>
</properties>
<modules>
<!-- Only run the OSGi tests for JDK 8 -->
<module>osgi</module>
Expand Down Expand Up @@ -1399,6 +1404,19 @@
</pluginManagement>
</build>
</profile>
<profile>
<id>testWithJdk11</id>
<activation>
<property>
<name>java-version.test.release</name>
<value>11</value>
</property>
</activation>
<properties>
<!-- Tests specific to Java 17+ won't work with JDK 11, so we disable them. -->
<java-version.test.java17.add-test-source-phase>none</java-version.test.java17.add-test-source-phase>
</properties>
</profile>
<profile>
<id>testWithJdk11+</id>
<activation>
Expand Down

0 comments on commit 1db51b4

Please sign in to comment.