11#! /bin/bash
22
3- flags ()
4- {
5- while test $# -gt 0
6- do
7- case " $1 " in
8- -ci)
9- CI_OPTIONS=" --batch-mode -T 1C"
10- ;;
11- * ) usage;;
12- esac
13- shift
14- done
15- }
16- flags " $@ "
3+ # Usage: ./scripts/run_no_prep_tests.sh [goals...]
4+ #
5+ # Arguments: Maven phases/goals to run (default: clean test)
6+ #
7+ # Environment variables:
8+ # CI_ARGS - Additional Maven CLI options (e.g., "--batch-mode -T 1C")
9+ # TRAVIS_JDK - Set to "openjdk8" to use JDK 8 module exclusions
10+
11+ MVN_PHASES=" ${*:- clean test} "
1712
1813is_jdk_8=` echo $JAVA_HOME | grep 8.`
1914is_jdk_14=` echo $JAVA_HOME | grep 14.`
3126 -pl ! bolt-http4k \
3227 -pl ! bolt-micronaut \
3328 -pl ! slack-jakarta-socket-mode-client \
34- clean test \
35- ' -Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false ${CI_OPTIONS } \
29+ $MVN_PHASES \
30+ ' -Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false ${CI_ARGS } \
3631 -DfailIfNoTests=false \
3732 -Dhttps.protocols=TLSv1.2 \
3833 --no-transfer-progress && \
@@ -41,16 +36,16 @@ elif [[ "${is_jdk_14}" != "" ]];
4136then
4237 ./mvnw \
4338 -pl ! bolt-micronaut \
44- clean test \
45- ' -Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false ${CI_OPTIONS } \
39+ $MVN_PHASES \
40+ ' -Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false ${CI_ARGS } \
4641 -DfailIfNoTests=false \
4742 -Dhttps.protocols=TLSv1.2 \
4843 --no-transfer-progress && \
4944 if git status --porcelain | grep . ; then git --no-pager diff; exit 1; fi
5045else
5146 ./mvnw \
52- clean test \
53- ' -Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false ${CI_OPTIONS } \
47+ $MVN_PHASES \
48+ ' -Dtest=test_locally.**.*Test' -Dsurefire.failIfNoSpecifiedTests=false ${CI_ARGS } \
5449 -DfailIfNoTests=false \
5550 -Dhttps.protocols=TLSv1.2 \
5651 --no-transfer-progress && \
0 commit comments