#!/bin/bash

mvn install:install-file -DgroupId=io.clickhouse -DartifactId=spark-clickhouse-connector_2.12 -Dversion=3.0.0_0.25 -Dpackaging=jar -Dfile=src/main/resources/jars/spark-clickhouse-connector_2.12-3.0.0_0.25.jar

echo "mvn install spark-clickhouse-connector_2.12-3.0.0_0.25.jar"

mvn clean compile package || exit 1

mkdir target/zip
cp -r azkaban/* target/zip/
cp target/DMP-*-jar-with-dependencies.jar target/zip/DMP.jar
cd target/zip
zip -r ../dmp.zip ./*
