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

Maven-shade-plugin can't relocate Scala classes.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 1.5.0
    • None
    • Table SQL / API
    • None

    Description

      Maven-shade-plugin only relocate java classes, but not Scala classes. I try to decompile flink-table jar, and find those guava path not beed relocated on those Scala classes. But flink job run normally for all time. Because flink-dist_${scala.binary.version}.jar contains the google guava and flink shaded guava at the same time. Why is the google guava still contained int the flink?
      Because we build flink by Maven-assembly-plugin at flink-disk module. The Assembly Plugin aggregate its all dependencies, includes those dependencies which are shaded now. If we use the following patch which exclude the Guava, then the flink-dist_${scala.binary.version}.jar only contains the flink-shaded-guava, not the google guava.

      Attachments

        1. exclude_guava.patch
          0.8 kB
          John Fang

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hustfxj John Fang
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: