-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathrun-tests.bash
More file actions
executable file
·31 lines (27 loc) · 976 Bytes
/
Copy pathrun-tests.bash
File metadata and controls
executable file
·31 lines (27 loc) · 976 Bytes
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
#!/bin/bash -ex
PROGRAM_FILES_DIR="/c/Program Files"
# Check if we are on Windows
[[ -d ${PROGRAM_FILES_DIR} ]] && {
export JAVA_HOME=${PROGRAM_FILES_DIR}/Java/jdk1.8.0_131
# NOTE: the ${JDK_BIN} will vary according to the version and location of the JDK you installed:
JDK_BIN=${JAVA_HOME}/bin
# Error if specified JDK bin dir does not exist
[[ ! -d ${JDK_BIN} ]] && {
echo "ERROR: JDK bin directory does not exist: '${JDK_BIN}'"
exit 1
}
# NOTE: the ${MVN_BIN} will vary according to the version and location of maven you installed:
MVN_BIN=~/Downloads/apache-maven-3.5.0/bin
# Error if specified maven bin dir does not exist
[[ ! -d ${MVN_BIN} ]] && {
echo "ERROR: maven bin directory does not exist: '${MVN_BIN}'"
exit 1
}
export PATH="${PATH}:${JDK_BIN}:${MVN_BIN}"
}
PWD=$(pwd)
export CLASSPATH=.:${PWD}/src:${PWD}/test:test/junit-4.12.jar:test/hamcrest-core-1.3.jar
mvn -version
java -version
javac -version
mvn clean verify