Details
-
Bug
-
Status: Patch Available
-
Major
-
Resolution: Unresolved
-
2.4.0
-
None
-
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.