File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed
Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ JV=` java -version 2>&1 > /dev/null | head -1`
4+ echo $JV | sed -E ' s/^.*version "([^".]*)\.[^"]*".*$/\1/'
5+
6+ if [ " $JV " != 16 ]; then
7+ case " $1 " in
8+ install)
9+ echo " Installing SDKMAN..."
10+ curl -s " https://get.sdkman.io" | bash
11+ source ~ /.sdkman/bin/sdkman-init.sh
12+ sdk version
13+ sdk install java 16.0.2-open
14+ ;;
15+ use)
16+ echo " must source ~/.sdkman/bin/sdkman-init.sh"
17+ exit 1
18+ ;;
19+ esac
20+ fi
Original file line number Diff line number Diff line change 1+ jdk :
2+ - openjdk16
13before_install :
2- - wget https://github.com/sormuras/bach/raw/master/install-jdk.sh
3- - source ./install-jdk.sh --feature 16 --license GPL
4+ - echo "Before Install"
5+ - bash ensure-java-16 install
6+ install :
7+ - echo "Install"
8+ - if ! bash ensure-java-16 use; then source ~/.sdkman/bin/sdkman-init.sh; fi
9+ - java -version
10+ - mvn install
You can’t perform that action at this time.
0 commit comments