seb-pereira commented on PR #36:
URL: 
https://github.com/apache/flink-connector-http/pull/36#issuecomment-4089407338

   **Expand Java prerequisites to Java 11-17?**
   
   Not specific to changes from this PR but when I built it locally I checked 
the 
[README](https://github.com/apache/flink-connector-http?tab=readme-ov-file#building-the-apache-flink-http-connector-from-source)
 that currently lists Java 11 as a prerequisite, which may give the impression 
that newer Java versions are not supported.
   
   This project uses Flink 1.20, which officially supports Java 11 and 17 
according to the [Flink 
documentation](https://nightlies.apache.org/flink/flink-docs-release-1.20/docs/deployment/java_compatibility/).
   
   I tested with Java 17 and confirm the build succeeded without any issues. 
   
   @davidradl could you consider updating the README to reflect Java 11-17 
support?
   
   ---
   
   For informational purposes: I also tried to test building with Java 21 -  / 
[documented for 
2.2.0](https://nightlies.apache.org/flink/flink-docs-release-2.2/docs/deployment/java_compatibility/)
 and official [Flink 2.2 Docker images use Java 
21](https://github.com/apache/flink-docker/blob/fbe91e0c410a77c7c894786fdf9d118b804eb2e7/2.2/scala_2.12-java21-ubuntu/Dockerfile)),
 and found only one issue when building the project:
      ```
     java.lang.reflect.InvocationTargetException
     Caused by: java.lang.NoSuchMethodError: 'com.sun.tools.javac.tree.JCTree 
com.sun.tools.javac.tree.JCTree$JCImport.getQualifiedIdentifier()'
     ```
   => The inherited Spotless Maven Plugin (2.27.1) with Google Java Format 
(1.7) does not support Java 21.
   
   For those interested in building with Java 21, the following changes enable 
compatibility:
   
   ```xml
   <properties>
       <spotless.version>2.43.0</spotless.version>
       
<spotless.google-java-format.version>1.17.0</spotless.google-java-format.version>
       <spotless.skip>false</spotless.skip>
   </properties>
   
   <plugin>
       <groupId>com.diffplug.spotless</groupId>
       <artifactId>spotless-maven-plugin</artifactId>
       <version>${spotless.version}</version>
       <configuration>
           <java>
               <googleJavaFormat>
                   <version>${spotless.google-java-format.version}</version>
               </googleJavaFormat>
           </java>
       </configuration>
   </plugin>
   ```


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