Closed nielsbasjes closed 4 years ago
As a test I cloned one of your other projects https://github.com/spinscale/elasticsearch-ingest-langdetect and simply doing a ./gradlew results in the exact same error.
I may be onto the root cause. It seems the build-tools from ES 7.7.0 require Java 14 to compile anything. https://github.com/elastic/elasticsearch/pull/54696
Yet the https://www.elastic.co/support/matrix#matrix_jvm states runtime 1.8 is still supported and
Java 9, Java 10, Java 12, and Java 13 are short term releases. We advise against using them unless you're prepared to handle the fast release cadence this imposes.
first, this is a community plugin, so it is not affected by the official support matrix. I try to be as compatible as possible all the time though.
However, I think you are confusing the java version required to build a plugin and the java version required to run a plugin, as you correctly noted in your last statement.
Elasticsearch 7.7 also requires a very recent java to build, however you can run it in java 8 as well. As this is using the build-tools from Elasticsearch, the java version build requirements are exactly the same than for Elasticsearch 7.7.
Hope that clears it up. Feel free to ask for more details.
Are we good to close this one?
Yes, thanks for your explanation.
As far as I can tell from https://www.elastic.co/support/matrix#matrix_jvm ElasticSearch 7.7.x should still support Java 1.8 so the plugin I have in mind should also work on Java 1.8.
So far I have not been able to let the default plugin as generated by this tool build (at all).
This is what I have tried so far:
When I create a new ingest processor on a system with only JDK 1.8 on it the newly created processor does not build because (as far as I can tell) a needed plugin requires Java 11 or newer.
When I upgrade to JDK 11 I still cannot build the default plugin as it now indicates it needs Java 14.
Reproduction:
I have Ubuntu 16.04 with
I create a new plugin and simply use all default values (the effect is identical if I fill in something 'real'):
When i build it I see
Since class file version 54 is Java 11+ I install OpenJDK 11 as described here https://askubuntu.com/questions/1203898/package-openjdk-11-jdk-has-no-installation-candidate
and I try to rebuild
Alternative to the JAVA_HOME environment variable I have tried setting it in a gradle.properties file but the error stays the same.
I have not yet been able to figure out where the "Java 14" error comes from. I do not have installed Java 14 and I prefer not to install it at all (for me "too new" and not "LTS")
As you can understand: I'm stuck.
What do I need to change to make this basic "dummy" plugin build?