-
Notifications
You must be signed in to change notification settings - Fork 9
/
build_jar.sh
36 lines (30 loc) · 995 Bytes
/
build_jar.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/bash
usage() {
cat <<_EOF_
USAGE: bash build_jar.sh [OPTIONS]
Builds a runnable NFSRODS JAR file based on the currently checked out source.
Options:
--non-interactive Launches docker container without -i and -t.
-h, --help Shows this message.
_EOF_
exit
}
docker_run_iteractive_options="-it"
while [ -n "$1" ]; do
case "$1" in
--non-interactive) shift; unset docker_run_iteractive_options;;
-h|--help) usage;;
esac
shift
done
# Compiles an executable JAR file from the local repository and
# stores all build artifacts in local_maven_repo.
#
# The local_maven_repo directory keeps your personal maven repository
# (i.e. $HOME/.m2) clean and safe from the "root" user.
docker run ${docker_run_iteractive_options} --rm --name nfsrods_builder \
-v $PWD/local_maven_repo:/root/.m2 \
-v $PWD:/irods_client_nfsrods \
-w /irods_client_nfsrods \
maven:3.8.4-openjdk-17 \
mvn -Dmaven.test.skip=true clean install