Coverage information was not collected.

1,154 views
Skip to first unread message

Omar Yasseen

unread,
Apr 23, 2014, 11:04:52 AM4/23/14
to jac...@googlegroups.com
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:\work\workspaceNew\AntSample\build\jacoco.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&amp;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>


Marc Hoffmann

unread,
Apr 23, 2014, 11:37:58 AM4/23/14
to jac...@googlegroups.com
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
> --
> 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 jacoco+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout [1].
>
>
> Links:
> ------
> [1] https://groups.google.com/d/optout
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages