Skip to content

Commit 229c8e0

Browse files
authored
sdkman
1 parent 47825b4 commit 229c8e0

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

Java/before_install.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
1212
gpgconf --reload gpg-agent
1313
systemctl --user status gpg-agent
1414

15+
echo conditional DEPLOY
1516
if tr_isSetAndNotFalse DEPLOY; then
1617
echo "DEPLOY is set -> starting to prepare SSH-deployment-phase"
1718
echo "DEPLOY is set -> importing SSH keys"
@@ -27,10 +28,18 @@ if tr_isSetAndNotFalse DEPLOY; then
2728
echo "done preparing SSH-deployment-phase"
2829
fi
2930

31+
echo conditional SKIP_BUILD
3032
if tr_isSetAndNotFalse SKIP_BUILD; then
3133
return 0
3234
fi
3335

36+
# JAVA Install workaround...
37+
echo Installing JAVA openJDK 19.0.1
38+
curl -s "https://get.sdkman.io" | bash
39+
source "$HOME/.sdkman/bin/sdkman-init.sh"
40+
sdk install java 19.0.1-open
41+
sdk use java 19.0.1-open
42+
3443
echo Trying to locate the Java JDK...
3544
which Java ||whereis java || echo "FATAL: Could not get java-path!"
3645
# export JAVA_HOME=/usr/local/lib/jvm/openjdk11

Java/script.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
#!/bin/bash
22

3+
echo conditional SKIP_BUILD
34
if tr_isSetAndNotFalse SKIP_BUILD; then
45
return 0
56
fi
67

78
echo Trying to locate the Java JDK...
8-
which Java ||whereis java || echo "FATAL: Could not get java-path!"
9+
which Java || whereis java || echo "FATAL: Could not get java-path!"
910
# export JAVA_HOME=/usr/local/lib/jvm/openjdk11
1011
echo JAVA_HOME: $JAVA_HOME
1112
export PATH="$JAVA_HOME/bin:$PATH"
1213

13-
echo $GPG_EXECUTABLE --version
14-
$GPG_EXECUTABLE --version
14+
echo conditional GPG_EXECUTABLE
15+
if tr_isSet GPG_EXECUTABLE then
16+
echo $GPG_EXECUTABLE --version
17+
$GPG_EXECUTABLE --version
18+
fi
1519

20+
echo mvn -B versions:set -DnewVersion=$POM_VERSION -DgenerateBackupPoms=false
1621
mvn -B versions:set -DnewVersion=$POM_VERSION -DgenerateBackupPoms=false
1722

23+
echo conditional MAVEN_CENTRAL
1824
if tr_isSetAndNotFalse MAVEN_CENTRAL; then
1925
if [ "$TRAVIS_BRANCH" = "master" ]; then
2026
mvn clean deploy --settings $TRAVIS/settings.xml -B -U -DreleaseSonatype=true

0 commit comments

Comments
 (0)