pan3793 commented on code in PR #6939:
URL: https://github.com/apache/hadoop/pull/6939#discussion_r1678825726


##########
hadoop-common-project/hadoop-auth/pom.xml:
##########
@@ -272,5 +272,68 @@
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>java-8</id>
+      <activation>
+        <jdk>1.8</jdk>
+      </activation>
+      <properties>
+        <maven.compiler.source>${javac.version}</maven.compiler.source>
+        <maven.compiler.target>${javac.version}</maven.compiler.target>
+      </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-enforcer-plugin</artifactId>
+            <version>3.0.0</version>
+            <executions>
+              <execution>
+                <id>enforce-java-version</id>
+                <goals>
+                  <goal>enforce</goal>
+                </goals>
+                <configuration>
+                  <rules>
+                    <requireJavaVersion>
+                      <version>1.8</version>
+                    </requireJavaVersion>
+                  </rules>
+                </configuration>
+              </execution>
+            </executions>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>x509-suppress</id>
+      <activation>
+        <jdk>[9,)</jdk>
+      </activation>
+      <properties>
+        <maven.compiler.source>${javac.version}</maven.compiler.source>
+        <maven.compiler.target>${javac.version}</maven.compiler.target>
+      </properties>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <argLine>--add-exports=java.base/sun.security.x509=ALL-UNNAMED 
--add-exports=java.base/sun.security.util=ALL-UNNAMED</argLine>

Review Comment:
   > Can you please clarify "unconditionally" here? Do you mean "regardless of 
Java version"?
   
   correct.
   
   > I guess Spark does not support building/testing with Java 8
   
   Spark 3.3 ~ 3.5 supports Java 8 ~ 17, you can check Spark branch-3.5
   
   https://github.com/apache/spark/blob/branch-3.5/pom.xml#L300



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to