With a simple Open Liberty project like one generated using the starter website (https://start.openliberty.io/) I get the following error on gradle build
:
$ gradle build
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'app-name'.
> Failed to notify project evaluation listener.
> groovy/lang/GroovyObject.getProperty(Ljava/lang/String;)Ljava/lang/Object;
* 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
My build.gradle has this:
plugins {
id 'war'
id 'io.openliberty.tools.gradle.Liberty' version '3.6.2'
}
I'm using Gradle v6.9.1 and Java 11.
Starting with the Liberty Gradle plugin version 3.6, Gradle v7.3 or higher is required.
You can either:
In the case where you already have a Gradle wrapper of an older version you might even need to do something like:
./gradlew wrapper --gradle-version=7.4.2
(You might need to do this because otherwise the ./gradlew wrapper
command will fail with the same, original error).