0

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.

enter image description here

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.

sangeetha kannan
  • 125
  • 1
  • 11
  • 1
    Can you please add a longer excerpt of the log? And please, no screenshot, this is not convenient at all. You've got plenty of services like pastebin.org to copy-paste long chunk of text. – Fabrice - SonarSource Team May 02 '16 at 13:00
  • Hi Fabrice - thank for your reply. As I mentioned I'm running the build through Jenkins. Please find the updated error message in the post. – sangeetha kannan May 02 '16 at 13:53
  • The error message is not telling a lot, but what may help is deleting the `.sonar` directory (`/app2/buildteam/.jenkins/jobs/MI-Cloud Migration/.sonar` in your case). – Roberg May 02 '16 at 20:18

0 Answers0