I have following dependency in pom.xml:
org.projectlombok
lombok
This happened with me when I installed maven with brew which also installed Java.15.x that leads to this error.
To validate, add debug option -X while building with maven and check the Java version that maven is using.
Delete the Java.15x directory and set JAVA_HOME in your .bashrc with the correct version of Java.