mozilla / gcp-ingestion

Documentation and implementation of telemetry ingestion on Google Cloud Platform

Home Page:https://mozilla.github.io/gcp-ingestion/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`mvn spotless:apply` no longer works on JRE 8

acmiyaguchi opened this issue · comments

maven:3-jdk-8 \

[INFO] --- spotless-maven-plugin:2.5.0:apply (default-cli) @ ingestion-beam ---
Nov 02, 2020 6:46:20 PM com.diffplug.spotless.FormatExceptionPolicyLegacy error
SEVERE: Step 'removeUnusedImports' found problem in 'src/main/java/com/mozilla/telemetry/decoder/DecryptPioneerPayloads.java':
You are running Spotless on JRE 8, which limits you to google-java-format 1.7
If you upgrade your build JVM to 11+, then you can use google-java-format 1.9, which may have fixed this problem.
java.lang.Exception: You are running Spotless on JRE 8, which limits you to google-java-format 1.7
If you upgrade your build JVM to 11+, then you can use google-java-format 1.9, which may have fixed this problem.

cc @relud - Would you be able to look into fixing this? I suspect it's because we pull in the spotless config from beam's repo and they may have upgraded their setup to JRE 11.

This was an issue on my part -- I upgraded to maven:3-jdk-11 and reran spotless:apply and ran into the same error. This seems to be the issue when you forget the type declaration within a function:

  private static String resolveInvalidNamespace(schemaNamespace) {