File tree Expand file tree Collapse file tree 2 files changed +25
-18
lines changed Expand file tree Collapse file tree 2 files changed +25
-18
lines changed Original file line number Diff line number Diff line change 44
55case $1 in
66
7+ init-m2-settings)
8+ MVN_SETTINGS=${TRAVIS_HOME} /.m2/settings.xml
9+ export JAVA_HOME=" /usr/lib/jvm/" $( ls /usr/lib/jvm/ | head -n 1) " /"
10+ echo " JAVA_HOME=" $JAVA_HOME
11+ export PATH=$JAVA_HOME /bin:$PATH
12+ if [[ -f ${MVN_SETTINGS} ]]; then
13+ if [[ $TRAVIS_OS_NAME == ' osx' ]]; then
14+ sed -i' ' -e " /<mirrors>/,/<\/mirrors>/ d" $MVN_SETTINGS
15+ else
16+ xmlstarlet ed --inplace -d " //mirrors" $MVN_SETTINGS
17+ fi
18+ fi
19+ ;;
20+
21+ init-m2-repo)
22+ if [[ $USE_MAVEN_REPO == ' true' && ! -d " ~/.m2" ]]; then
23+ echo " Maven local repo cache is not found, initializing it ..."
24+ cd sevntu-checks
25+ mvn -e --no-transfer-progress install -Pno-validations
26+ cd ../
27+ fi
28+ ;;
29+
730pr-description)
831 .ci/xtr_pr-description.sh
932 ;;
Original file line number Diff line number Diff line change @@ -89,25 +89,9 @@ script:
8989 echo "Installed JVMs: "
9090 ls /usr/lib/jvm/
9191 - |
92- set -e
9392 if [[ $RUN_JOB == 1 ]]; then
94- MVN_SETTINGS=${TRAVIS_HOME}/.m2/settings.xml
95- export JAVA_HOME="/usr/lib/jvm/"$(ls /usr/lib/jvm/ | head -n 1)"/"
96- echo "JAVA_HOME="$JAVA_HOME
97- export PATH=$JAVA_HOME/bin:$PATH
98- if [[ -f ${MVN_SETTINGS} ]]; then
99- if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
100- sed -i'' -e "/<mirrors>/,/<\/mirrors>/ d" $MVN_SETTINGS
101- else
102- xmlstarlet ed --inplace -d "//mirrors" $MVN_SETTINGS
103- fi
104- fi
105- if [[ $USE_MAVEN_REPO == 'true' && ! -d "~/.m2" ]]; then
106- echo "Maven local repo cache is not found, initializing it ..."
107- cd sevntu-checks
108- mvn -e --no-transfer-progress install -Pno-validations
109- cd ../
110- fi
93+ ./.ci/travis.sh init-m2-settings
94+ ./.ci/travis.sh init-m2-repo
11195 echo "eval of CMD is starting";
11296 echo "CMD=$CMD";
11397 eval $CMD;
You can’t perform that action at this time.
0 commit comments