laurentgo commented on code in PR #43381:
URL: https://github.com/apache/arrow/pull/43381#discussion_r1690037091


##########
java/pom.xml:
##########
@@ -1274,5 +1274,70 @@ under the License.
         </plugins>
       </build>
     </profile>
+
+    <!-- Cross java version test profiles -->
+    <profile>
+      <id>cross-jdk-testing</id>
+      <activation>
+        <property>
+          <name>arrow.test.jdk-version</name>
+        </property>
+      </activation>
+      <build>
+        <plugins>
+          <plugin>
+            <artifactId>maven-enforcer-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>check-jdk-version-property</id>
+                <goals>
+                  <goal>enforce</goal>
+                </goals>
+                <phase>validate</phase>
+                <configuration>
+                  <rules>
+                    <requireProperty>
+                      <property>arrow.test.jdk-version</property>
+                      <message>"JDK version used for test must be 
specified."</message>
+                      <regex>^\d{2,}</regex>
+                      <regexMessage>"JDK version used for test must 11, 17, 
21, ..."</regexMessage>
+                    </requireProperty>
+                  </rules>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+          <!--
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-toolchains-plugin</artifactId>
+            <configuration>
+              <jdk>
+                <version>${arrow.test.jdk-version}</version>
+              </jdk>
+            </configuration>
+          </plugin>
+          -->

Review Comment:
   I was actually trying to see the value of the toolchain plugin and the 
enforcer message as well.
   
   I had more values when Java 8 was supported because you had to specify 1.8 
explicitly over 8, but now that we moved to Java 11, I'm not even sure the 
enforcer check helps because surefire or failsafe will simply mention the 
absence of a JDK toolchain for version X (I guess later in the build vs fail 
safe, so maybe we can keep the enforcer check just for that)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to