We are currently experiencing the same issue, but we cannot use a commandline approach, as this error is being raised by the prepare sonar task.
I raised the following ticket: Unable to run sonarscan because of error 400 by retrieving qualityprofile since a few days