I'm integrating the sonar for my ant build. And i add the below properties in my file.
I'm using SonarQube 4.3.3 with Sonar-ant-task 2.2.jar.
I'm using Jenkins to make the build.
<project name="system_make" default="all" basedir="." xmlns:sonar="antlib:org.sonar.ant" >
<target name="sonar">
<property name="sonar.jdbc.url" value="${JDBC_URL}>" />
<property name="sonar.jdbc.username" value="PROD_SONAR_43" />
<property name="sonar.jdbc.password" value="{aes}gLq2TqprrkJTNsTn8O6QKQ==" />
<property name="sonar.secretKeyPath" value="/app2/team/xxx/secretkey.txt " />
<property name="sonar.host.url" value="http://<IP>/9000" />
<property name="sonar.projectKey" value="YYYY:ZZZZ" />
<property name="sonar.projectVersion" value="1.0" />
<property name="sonar.language" value="java" />
<property name="sonar.sources" value="src" />
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath path="/app2/team/SonarQube4.3.3_Prod/sonarqube-4.3.3/lib/sonar-ant-task-2.2.jar" />
</taskdef>
<sonar:sonar />
</target>
while i running the build i'm getting the below exception.
Please let me know the solution for the above error.
sonar:
[sonar:sonar] Apache Ant version 1.6.5 compiled on June 2 2005
[sonar:sonar] SonarQube Ant Task version: 2.2
[sonar:sonar] Loaded from: file:/app2/buildteam/SonarQube4.3.3_Prod/sonarqube-4.3.3/lib/sonar-ant-task-2.2.jar
[sonar:sonar] INFO: Default locale: "en_US", source code encoding: "UTF-8" (analysis is platform dependent)
[sonar:sonar] INFO: Work directory: /app2/buildteam/.jenkins/jobs/MI-Cloud Migration/.sonar
[sonar:sonar] INFO: SonarQube Server 4.3.3
BUILD FAILED
/app2/buildteam/.jenkins/jobs/MI-Cloud Migration/system_make.xml:32: org.sonar.runner.impl.RunnerException: Unable to execute Sonar.