Maven+Travis ci+SonarCloud

hi community, i have a problem with integrating an apache project with sonarcloud. The project is compiled through travis CI, but in order to make it work I need java 8. But with the new update with versions prior to Java 11 SonarCloud fails me through the command “mvn sonar: sonar …”, how can I solve ??
thanks a lot