#!/usr/bin/env bash

VERSION="3.19-SNAPSHOT"

set -e

rm -rf project

mkdir -p project/src/main/java

wget http://pullenti.ru/assets/docs/UnitextJava.zip -O UnitextJava.zip
unzip UnitextJava.zip -d project
rm -f UnitextJava.zip

mv project/com project/src/main/java/com
sed "s/%VERSION%/$VERSION/g" pom.xml.template > project/pom.xml

pushd project
mvn install
popd
