diff --git a/Jenkinsfile b/Jenkinsfile
index 5dfefaf614e5..3f6d3b9a0c6a 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -288,7 +288,7 @@ fi
loadWS();
}
stage('init-metastore') {
- withEnv(["dbType=$dbType"]) {
+ withEnv(["dbType=$dbType","MAVEN_OPTS=-P derby-test"]) {
sh '''#!/bin/bash -e
set -x
echo 127.0.0.1 dev_$dbType | sudo tee -a /etc/hosts
diff --git a/packaging/src/main/assembly/bin.xml b/packaging/src/main/assembly/bin.xml
index fbf65c7ffd95..66db288d3ba7 100644
--- a/packaging/src/main/assembly/bin.xml
+++ b/packaging/src/main/assembly/bin.xml
@@ -49,6 +49,7 @@
commons-configuration:commons-configuration
org.apache.hive:hive-jdbc:*:standalone
org.apache.hive:hive-contrib
+ org.apache.derby:derby
diff --git a/pom.xml b/pom.xml
index e0ea2ef17ef1..290f503947ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2128,5 +2128,16 @@
+
+ derby-test
+
+
+ org.apache.derby
+ derby
+ 10.14.2.0
+ test
+
+
+