Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-32894

flink-connector-parent should use maven-shade-plugin 3.3.0+ for Java 17

    XMLWordPrintableJSON

Details

    Description

      When I tried to compile flink-sql-connector-kafka with Java 17 and using profile -Pjava17 -Pjava17-target:

       

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-shade-plugin:3.2.4:shade (shade-flink) on project flink-sql-connector-kafka: Error creating shaded jar: Problem shading JAR flink-connectors/flink-connector-kafka/flink-connector-kafka/target/flink-connector-kafka-3.1-SNAPSHOT.jar entry org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducerBase.class: java.lang.IllegalArgumentException: Unsupported class file major version 61 

      maven-shade-plugin supports Java 17 starting from 3.3.0 (see MSHADE-407). We need to set the version of maven-shade-plugin to at least 3.3.0 for profile java17 in flink-connector-parent pom.  

      Attachments

        Issue Links

          Activity

            People

              renqs Qingsheng Ren
              renqs Qingsheng Ren
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: