aggregate
aggregate copied to clipboard
Could not determine java version from '11.0.10' (after running `./gradlew appRunWar` command)
Software and hardware versions
OS: Ubuntu 18.04.5 LTS Java version: 11.0.10 Tomcat version: 9.0.44 PostgreSQL version: 10.16 MySQL version: 5.7.33 Git LFS version: 2.13.2 Docker version: 20.10.5 Docker Compose version: 1.28.5
Problem description
Could not determine java version from '11.0.10' (after running ./gradlew appRunWar
command)
Steps to reproduce the problem
-
I followed this documentation https://github.com/getodk/aggregate to install ODK Aggregate on a private server. Everything was fine until this section https://github.com/getodk/aggregate#building-and-running-the-project.
-
I ran
./gradlew appRunWar
command inside the aggregate folder and the following error appeared.
user@ip:~/aggregate$ ./gradlew appRunWar
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '11.0.10'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
- I found this link https://stackoverflow.com/questions/54358107/gradle-could-not-determine-java-version-from-11-0-2 then I changed the gradle distribution url to version 5.4.1
user@ip:~/aggregate$ cd gradle/
user@ip:~/aggregate/gradle$ ls
wrapper
user@ip:~/aggregate/gradle$ cd wrapper/
user@ip:~/aggregate/gradle/wrapper$ ls
gradle-wrapper.jar gradle-wrapper.properties
user@ip:~/aggregate/gradle/wrapper$ sudo nano gradle-wrapper.properties
Before (original from ODK Aggregate repository):
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-all.zip
After:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
- I ran again
./gradlew appRunWar
command then another error (A problem occurred configuring root project 'aggregate'.
) appeared.
user@ip:~/aggregate$ ./gradlew appRunWar
Downloading https://services.gradle.org/distributions/gradle-5.4.1-all.zip
..............................................................................................................................
Unzipping /home/user/.gradle/wrapper/dists/gradle-5.4.1-all/3221gyojl5jsh0helicew7rwx/gradle-5.4.1-all.zip to /home/user/.gradle/wrapper/dists/gradle-5.4.1-all/3221gyojl5jsh0helicew7rwx
Set executable permissions for: /home/user/.gradle/wrapper/dists/gradle-5.4.1-all/3221gyojl5jsh0helicew7rwx/gradle-5.4.1/bin/gradle
Welcome to Gradle 5.4.1!
Here are the highlights of this release:
- Run builds with JDK12
- New API for Incremental Tasks
- Updates to native projects, including Swift 5 support
For more details see https://docs.gradle.org/5.4.1/release-notes.html
Starting a Gradle Daemon (subsequent builds will be faster)
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'aggregate'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.avast.gradle:gradle-docker-compose-plugin:0.6.8.
Required by:
project :
> Could not resolve com.avast.gradle:gradle-docker-compose-plugin:0.6.8.
> Could not get resource 'https://jcenter.bintray.com/com/avast/gradle/gradle-docker-compose-plugin/0.6.8/gradle-docker-compose-plugin-0.6.8.pom'.
> Could not GET 'https://jcenter.bintray.com/com/avast/gradle/gradle-docker-compose-plugin/0.6.8/gradle-docker-compose-plugin-0.6.8.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve de.fuerstenau.buildconfig:de.fuerstenau.buildconfig.gradle.plugin:1.1.8.
Required by:
project :
> Could not resolve de.fuerstenau.buildconfig:de.fuerstenau.buildconfig.gradle.plugin:1.1.8.
> Could not get resource 'https://jcenter.bintray.com/de/fuerstenau/buildconfig/de.fuerstenau.buildconfig.gradle.plugin/1.1.8/de.fuerstenau.buildconfig.gradle.plugin-1.1.8.pom'.
> Could not HEAD 'https://jcenter.bintray.com/de/fuerstenau/buildconfig/de.fuerstenau.buildconfig.gradle.plugin/1.1.8/de.fuerstenau.buildconfig.gradle.plugin-1.1.8.pom'. Received status code 502 from server: Bad Gateway
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 27s
Expected behavior
The ODK Aggregate server is running on <my_private_ip_address>:8080
.
Other information
I have a hypothesis (ODK Aggregate server must use Java version 8 to run). Is it correct?