Hi Marc,

Thanks for your prompt reply.

I'm trying to use ant task as below by giving path to server side jar files
directory. However jacoco doesn't generate the coverage report correctly.
The generated xml report has zero coverage data. Note that jacoco.exec file
is not empty and its size is around 414K. Let me know whether my
jacoco-report ant task is valid ? do I need to point valid project
structure name here for "structure name". Since I'm trying to generate
server side code coverage my project has only test classes to call server
side APIs.

<jacoco-report>
        <executiondata>
            <file file="${project.basedir}/target/jacoco.exec"/>
        </executiondata>
        <structure name="Minerva">
            <classfiles>
            <fileset dir="/path/to/jar/directory/in/my/extracted/server/">
                <include name="**/*.jar"/>
            </fileset>
            </classfiles>
        </structure>
        <html destdir="${project.basedir}/target/jacoco/report"/>
        <xml destfile="${project.basedir}/target/jacoco/report/jacoco.xml"/>
    </jacoco-report>


Your feedback really appreciated.

Thanks,
Krishantha.

On Tue, Mar 10, 2015 at 9:05 PM, Marc R. Hoffmann <
[email protected]> wrote:

> Where do you "extract all JAR files" from?
>
> Note that by default the JaCoCo reporting Ant task or Maven goal will
> recursively search EAR/WAR/JAR files for class files.
>
> Regards,
> -marc
>
>
> On 10.03.15 11:17, [email protected] wrote:
>
>> Hi all,
>>
>> Can I use Jacoco for jar instrumentation without using Maven or ant tasks
>> provided.
>>
>> I know that adding agent jar as JVM option to my server startup script
>> will generate jcoco.exec file. However as per the documentation, to
>> generate coverage report, I need to point class files. Since I don't have
>> source files or class files, only option left is to extract all jar files
>> and put class files to temp directory, and point them at report generation.
>> Is there any better alternative for this ?
>>
>> Thanks,
>> Krishantha.
>>
>>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jacoco/BmMFpFG0vdY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jacoco/54FF0F56.1070309%40mountainminds.com.
>
> For more options, visit 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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/CAAws007gXn-e%3DrfDPHn-WB06%2Btmm8m5_btaP4ab%3D_eF%2Bq779_g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to