Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-4728

Compilation Failure of Ranger 2.4 on Maven 3.8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.4.0
    • None
    • admin
    • None

    Description

      Issue: ranegr 2.4 can be compiled successfully in Maven 3.6, but fails in Maven 3.8.

      Due to improvements made in Maven versions after 3.6, the `kafka.version` setting can affect the versions of dependencies in the global JAR files.

       

      Kylin-server-base ultimately depends on `org.apache.kafka`. When compiled in Maven 3.6, it resolves to `org.apache.kafka:kafka_2.11:2.1.1`. However, in Maven 3.8, it attempts to find `org.apache.kafka:kafka_2.11:2.8.2`, which does not exist in Maven repositories.

      Maven 3.8 introduces a new feature that rigorously handles dependency versions defined in the global POM file. Dependency versions defined in the global POM file take precedence over project-specific versions, potentially overriding explicitly specified versions. This stricter version propagation rule can lead to different dependency resolution behavior in Maven 3.8 compared to Maven 3.6.

      Therefore, in Maven 3.8, the `kafka.version` defined in the global POM affects the Kafka version in kylin-server-base, leading to compilation failure. Adding dependency management can resolve this issue.

      Attachments

        1. image-2024-03-01-13-35-02-631.png
          1.04 MB
          Jialiang Cai
        2. image-2024-03-01-13-36-20-548.png
          1.04 MB
          Jialiang Cai
        3. image-2024-03-01-13-36-49-585.png
          604 kB
          Jialiang Cai
        4. patch-RANGER-4728.diff
          1 kB
          Jialiang Cai

        Activity

          People

            jialiang Jialiang Cai
            jialiang Jialiang Cai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: