#!/usr/bin/bash -ex

java -jar target/ledgerdb-server-1.0-SNAPSHOT.jar server config.yml

#!/usr/bin/bash -ex

jarfile=target/ledgerdb-server-1.0-SNAPSHOT.jar

if find target/classes/ -type f -name '*.class' -newer $jarfile | grep -q .
then
    mvn package
fi

java -jar $jarfile server config.yml

Call mvn package if target/classes/ are newer than the jar file.
Call mvn package if target/classes/ are newer than the jar file.
