diff options
| author | Hannes Rosenögger <123haynes@gmail.com> | 2019-03-16 12:48:12 +0100 |
|---|---|---|
| committer | Hannes Rosenögger <123haynes@gmail.com> | 2019-03-21 10:36:52 +0100 |
| commit | 3a52cda095fae55e13a94e42f3c83263454bcadd (patch) | |
| tree | db7231f6a2b150cbd99f113ec15897bc06d48292 /run.sh | |
| parent | 663c87797b7e52d6db06603770d120958c65c0a3 (diff) | |
Add Java 11 support
This commit installs JAVA 11 and introduces a new ENV variable "LM_JAVA_VERSION".
If this variable is set to 11, maven and gradle will use JAVA 11 instead of JAVA 8.
If the variable is not set, the license finder will fall back to the default defined in
licensefinder/licensefinder which is currently Java 8.
This is necessary because JAVA 11 is not fully backwards compatible with JAVA 8.
Without this change the license finder will fail for all JAVA 11 projects.
Diffstat (limited to 'run.sh')
| -rwxr-xr-x | run.sh | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -153,11 +153,21 @@ case "$COMMAND" in if test -f pom.xml ; then # Install Java Maven dependencies. + if [[ ${LM_JAVA_VERSION} = "11" ]]; then + JAVA_HOME=/usr/lib/jvm/adoptopen_jdk11 + elif [[ ${LM_JAVA_VERSION} = "8" ]]; then + JAVA_HOME=/usr/lib/jvm/oracle_jdk8 + fi mvn install ${MAVEN_CLI_OPTS:--DskipTests} fi if test -f build.gradle ; then - gradle build + if [[ ${LM_JAVA_VERSION} = "11" ]]; then + JAVA_HOME=/usr/lib/jvm/adoptopen_jdk11 + elif [[ ${LM_JAVA_VERSION} = "8" ]]; then + JAVA_HOME=/usr/lib/jvm/oracle_jdk8 + fi + gradle build fi else echo "Running '${SETUP_CMD[@]}' to install project dependencies..." |
