I'm having a weird issue while trying to compile and package an ingest plugin for ES 7.4.0.
I started from @spinscale's cookiecutter project template and was able to properly create the project and implement the business logic.
However, when trying to compile the project using gradle clean check
I get the following error:
> Task :generateGlobalBuildInfo FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':generateGlobalBuildInfo'.
> The compiler java.home must be set to a JDK installation directory for Java 12 but is [/Library/Java/JavaVirtualMachines/jdk-11.0.4.jdk/Contents/Home] corresponding to [11]
* 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 597ms
1 actionable task: 1 executed
I have Java 11 installed (as can be seen in the error message). Since Java 12 is EOL, it is impossible for me to install it. I have tried with Java 13, but I get a different error message:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/consulthys/workspaces/elasticsearch-ingest-h3/build.gradle' line: 18
* What went wrong:
A problem occurred evaluating root project 'ingest-h3'.
> Failed to apply plugin [class 'de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin']
> Could not create plugin of type 'ForbiddenApisPlugin'.
> Could not initialize class de.thetaphi.forbiddenapis.gradle.ForbiddenApisPlugin
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring root project 'ingest-h3'.
> Must specify license and notice file for project :
* 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 615ms
So it seems to require me to have Java 12, even though the support matrix explicitly states that Java 12 is not supported with 7.4.0, only Java 11 ad 13.
I'd appreciate if anyone could shed some light on this and how to resolve this issue, it's a bit frustrating.