Got UnsupportedClassVersionError with proper settings

Hi Everyone,

Got this exception during the maven build:
java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

Yes, the Sonar server is on Java11, and my source is in Java8.
However my pom.xml contains:


And I have even tried to add this from command line:
mvn clean install sonar:sonar -Dsonar.login=…

When I give -Dsonar.scanner.dumpToFile=file.txt to the build, the dump file contains

Don’t have any other ideas :slight_smile:
It could be important: sonar-maven-plugin: is the plugin I am fighting.


The analysis step (sonar:sonar goal) must be executed on JDK 11. There’s some guidance here:

Thank you Felipe,

sonar:sonar with jdk11 is working fine. I am doing some tests how this and the maven-compiler-plugin java8 restriction can work together. But seems to be fine for now.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.