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.
the java version should only be required for building, but you can still run elasticsearch and the plugin with java 8.
Forbidden APIs has just been released to properly support java 13, and was updated in the ES project only a few days ago. To me it seems that building the plugin with java 12 should be fine and run it with the java version you run Elasticsearch as.
The problem is that I have never installed Java 12 and since it's EOL it's not possible to install it any more. So as it stands, I cannot build the plugin with either Java 8, 11 or 13.
Small workaround around the installation issue: Using sdkman installing java 12 is just a single command away. sdk install java 12.0.2-open. You can use sdk list java to list possible installation candidates.
Please don't hesitate to open a github issue with the issues you had to get up and running, I think it is worthwhile to share. If you have any suggestions do better organize that process, please add them as well.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.