I'm currently evaluating TeamCity in order to move away from Jenkins. More or less everything is fine but I'm having problems figuring out the best way to run a SonarQube analysis.
We have Java based Maven projects.
The documentation (https://confluence.jetbrains.com/display/TW/SonarQube+Integration) states:
Triggerring the analysis with Maven is not directly supported. To use the SonarQube runner with a Maven project, add the sonar:sonar goal to your project
However, when I attempt to use maven sonar:sonar I get the following error:
Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project library: One of setGitDir or setWorkTree must be called.
I have also tried the SonarQube runner without the Maven sonar:sonar. This runs but a number of parameters (those contained in the pom for example) aren't extracted and so the Sonar analysis is incomplete.
So, any suggestions on how to run Sonar with a Maven/Java project?