From 3bbe269a96dd4fe675e92489b693b2afb14150c7 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Tue, 19 Jul 2022 13:27:55 +0200 Subject: [PATCH] Fix Phoenix connector compilation in IntelliJ IntelliJ doesn't seem to support multi-module projects when a module being dependent on is built with shading. As a workaround, add original dependency to compile-time classpath, but exclude it from final build. This let's IntelliJ compile the project, while still keeping the patched & shaded library as the runtime dependency. Alternatively we could move `trino-phoenix5-patched` module to a separate repo. Not doing this in hope this is a temporary workaround only. --- plugin/trino-phoenix5/pom.xml | 50 +++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/plugin/trino-phoenix5/pom.xml b/plugin/trino-phoenix5/pom.xml index 6e3270102c68..542a1da92ac6 100644 --- a/plugin/trino-phoenix5/pom.xml +++ b/plugin/trino-phoenix5/pom.xml @@ -153,6 +153,20 @@ provided + + + + org.apache.phoenix + phoenix-client-embedded-hbase-2.2 + 5.1.2 + provided + true + + org.openjdk.jol jol-core @@ -386,20 +400,28 @@ + + + maven-dependency-plugin + + + + org.apache.phoenix:phoenix-client-embedded-hbase-2.2 + + + + + + io.trino + trino-maven-plugin + true + + + + org.apache.phoenix:phoenix-client-embedded-hbase-2.2 + + + - - - - - errorprone-compiler - - - org.apache.phoenix - phoenix-client-embedded-hbase-2.2 - 5.1.2 - - - -