Skip to content

Commit d236813

Browse files
committed
another attempt
1 parent b11ceeb commit d236813

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

ensure-java-16

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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

jitpack.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
jdk:
2+
- openjdk16
13
before_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

0 commit comments

Comments
 (0)