File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
Expand file tree Collapse file tree 2 files changed +30
-0
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 " != 17 ]; 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 17.0.1-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+ jdf :
2+ - openjdk17
3+ before_install :
4+ - echo "Before Install"
5+ - bash ensure-java-17 install
6+ install :
7+ - echo "Install"
8+ - if ! bash ensure-java-17 use; then source ~/.sdkman/bin/sdkman-init.sh; fi
9+ - java -version
10+ - mvn install clean -DskipTests
You can’t perform that action at this time.
0 commit comments