I'm using the shadowJar
Gradle target provided by the com.github.johnrengelman.shadow Gradle plugin to build up an application, which requires an org.apache.hive.jdbc.HiveDriver
to connect to Kudu using Impala.
The problem is that when I use standard approach to import the driver in Scala:
Class.forName("org.apache.hive.jdbc.HiveDriver")
- the shadow plugin removes it from the resulting JAR, implying an runtime error of:
java.lang.ClassNotFoundException: org.apache.hadoop.hive.jdbc.HiveDriver
.
My build.gradle
contains:
dependencies {
implementation {
"org.apache.hive:hive-jdbc:1.2.1"
}
}
How do I instruct the shadow plugin not to delete the required dependency injected via a String?