lindong28 opened a new pull request, #21557:
URL: https://github.com/apache/flink/pull/21557

   ## What is the purpose of the change
   
   `mvn install` should report Java version mismatch if users are building 
Flink source with JDK version below 11. This can help users quickly identify 
the root cause of build failure rather than trying to understand the following 
error.
   
   ```
   [ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-shade-plugin:3.4.1:shade (shade-flink) on 
project flink-table-planner_2.12: Error creating shaded jar: Problem shading 
JAR 
/Users/lindong/research/flink/flink-table/flink-table-planner/target/flink-table-planner_2.12-1.17-SNAPSHOT.jar
 entry 
org/apache/calcite/sql/validate/SqlValidatorImpl$NavigationExpander.class: 
org.apache.maven.plugin.MojoExecutionException: Error in ASM processing class 
org/apache/calcite/sql/validate/SqlValidatorImpl$NavigationExpander.class: 19 
-> [Help 1]
   ```
   
   ## Brief change log
   
   This PR made the following changes:
   - Updated the requireJavaVersion from `1.8.0` to `[11,)` for the release 
profile.
   - Updated the requireJavaVersion from `${target.java.version}` to `[11,)` 
for non-release profile.
   
   ## Verifying this change
   
   This PR is tested with the following manual tests:
   - Prior to this PR, compiling Flink master branch with JDK 1.8 will fail 
with the error described above.
   - After this PR, compiling Flink master branch with JDK 1.8 will fail with 
error `Detected JDK Version: 1.8.0-151 is not in the allowed range [11,)`.
   - Compiling Flink master branch with JDK 11 can succeed, both before and 
after this PR.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector:  no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? N/A
   


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