About Writing Custom Java Rules 101

I am referring to the official document
[sonar-java/CUSTOM_RULES_101.md at master · SonarSource/sonar-java · GitHub]
to try to develop a plug-in for Java custom rules MD self defining Java rules.I change the name of "pom_SQ_8_9_LTS.xml"to “pom.xml” and use the instruction “mvn clean install” to always prompt errors.The error content is:
"[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project java-checks-test-sources: Fatal error compiling: error: release version is not supported 16 → [Help 1]”.
My local environment is jdk11. SonarQube version is 8.9.3LTS,Maven has two versions, 3.6.3 and 3.8.3, none of which can be built successfully. Also,the information set in pom.xml is
Can you guys give me some advice?
thank you so!

Hello @KevinJin

It seems to me that you are trying to build the whole Java analyzer project, which requires Java 16 to build.

java-custom-rules-example is a separated nested sample project, you should therefore run the command from this folder, not the root of the analyzer.

Hope it helps,