Solved, apparently on new versions I can't use the command sonar-scanner
and rely on the properties file, so the analysis has to be done with the full command:
sonar-scanner -Dsonar.projectKey="<name of your project>" -Dsonar.host.url=<your url> -Dsonar.token=<your token>
.