SonarScanner for Ant is deprecated on SonarCloud and as of SonarQube 9.9. Please see Moving from SonarScanner for Ant to SonarScanner documentation for how to migrate to the SonarScanner.
This example demonstrates how to analyze a simple Apache Ant project with SonarScanner for Ant.
- SonarScanner for Ant 2.7.1 or higher
- Ant 1.10.0 or higher
- Set the path to the SonarQube Ant Task in the build.xml file
- Set the URL of your SonarQube instance in the property 'sonar.host.url'
- Run the following command:
ant all