Hi Omar,
may I ask you to ask this question at SonarQube?
http://www.sonarqube.org/get-support/
The Sonar integration is directly maintained by Sonar.
Thx,
-marc
On 2014-04-23 17:04, Omar Yasseen wrote:
Hi All,
I'm using Sonar 4.2 and jacoco-0.7.1 and Ant 1.7.1
Getting no coverage data in Sonar and this log output during Ant
build:
15:05:41.158 INFO - Sensor JaCoCoSensor...
[sonar:sonar] 15:05:41.162 INFO - Analysing
C:workworkspaceNewAntSamplebuildjacoco.exec
[sonar:sonar] 15:05:41.175 WARN - Coverage information was not
collected. Perhaps you forget to include debug information into
compiled classes?
These are the relevant Ant targets, thanks for the help!
<target name="junit" depends="jar">
<javac srcdir="test" destdir="build/classes" classpathref="classpath"
debug="true"/>
<jacoco:coverage destfile="${basedir}/build/jacoco.exec">
<junit printsummary="yes" fork="true">
<classpath>
<path refid="classpath"/>
<path refid="application"/>
<pathelement location="build/classes"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="build/tests" haltonfailure="true">
<fileset dir="test" includes="**/*Test.java"/>
</batchtest>
</junit>
</jacoco:coverage>
</target>
<target name="sonar" depends="junit">
<property name="sonar.jdbc.url"
value="jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8"
/>
<property name="sonar.jdbc.username" value="sonar" />
<property name="sonar.jdbc.password" value="sonar" />
<property name="sonar.projectVersion" value="1.0" />
<property name="sonar.language" value="java" />
<property name="sonar.projectKey" value="AntSample" />
<property name="sonar.projectName" value="AntSample" />
<property name="sonar.sources" value="src" />
<property name="sonar.tests" value="test" />
<property name="sonar.binaries" value="lib" />
<property name="sonar.junit.reportsPath" value="build/tests" />
<property name="sonar.jacoco.reportPath"
value="${basedir}/build/jacoco.exec" />
<property name="sonar.dynamicAnalysis" value="reuseReports" />
<property name="sonar.java.coveragePlugin" value="jacoco" />
<sonar:sonar/>
</target>
--
You received this message because you are subscribed to the Google
Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
For more options, visit https://groups.google.com/d/optout [1].
Links:
------
[1] https://groups.google.com/d/optout
--
You received this message because you are subscribed to the Google Groups "JaCoCo
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.