Hi Jesper,

glad you resolved the problem! I'm sorry about the issue with the Gradle plug-in but there is not much we can do about it here. You might report the issue to the Gradle maintainers.

Cheers,
-marc

On 23.03.14 00:16, Jesper Thuun-Petersen wrote:
Hi Marc,

Thanks for the answer. My griefs did not stem from any of the reasons you give below, but I did figure out what was wrong.

Having fought with the problem for at least a day, I decided to try one last thing: calling the jacoco ant tasks from ant directly, instead of through Gradle as described above.

It worked like a charm! I have no idea why I still can't get the gradle code above to work, but I also tried the gradle jacoco plugin, and that turned out also to work fine?!

I'm now succesfully using the gradle plugins, and everything seems to work as it should.

Best regards
/Jesper



Den torsdag den 20. marts 2014 17.57.22 UTC+1 skrev Marc R. Hoffmann:

    Hi Jesper,

    the report does not list any sessions or execution data this means
    either

    1) The exec file is empty: If you open the exec file with an test
    editor
    (its binary) you should see strings with your class names.
    2) No exec file has been provided to the report task: There should
    be an
    INFO log saying "Loading execution data file xxx".

    Best regards,
    -marc


    On 19.03.14 07:28, [email protected] <javascript:> wrote:
    > I have a server running inside a felix OSGi container.
    >
    > I instrument the startup with this agent configuration:
    >
    > -javaagent:E:/java/jacoco/lib/jacocoagent.jar=output=tcpserver,
    >   includes=com.stibo.*,sessionid=jtpe,classdumpdir=dump
    >
    > To get a Jacoco dump and report and have two tasks in a simple
    gradle script, interfacing with the Jacoco ant tasks. I have
    attached it below for reference.
    >
    > I call the dump tasks, and I get a remote.exec file with the
    needed data.
    > After that, I call the report task, and a nice report is
    generated for me.
    >
    > The generated report includes all the right info about classes
    and methods.
    >
    > Unfortunately, the report has no coverage data at all, 0% on all
    classes and methods.
    >
    > The sessions link in the upper right hand corner says this:
    >
    > ----
    > Sessions
    >
    > No session information available.
    >
    > No execution data available.
    > ----
    >
    > I have no idea what to do to make the report work. Hints
    appreciated!!
    >
    > Best regards
    > /Jesper Thuun-Petersen
    >
    >
    > Gradle script:
    >
    > configurations {
    >         jacoco
    > }
    > dependencies {
    >         jacoco 'org.jacoco:org.jacoco.ant:0.6.5.201403032054'
    > }
    >
    > task dump << {
    >         ant {
    >                 taskdef(name: "dump", classname:
    "org.jacoco.ant.DumpTask", classpath: configurations.jacoco.asPath)
    >                 dump(address: "localhost", reset: "true",
    destfile: "remote.exec")
    >         }
    > }
    >
    > task report << {
    >         ant {
    >                 taskdef(name: "report", classname:
    "org.jacoco.ant.ReportTask", classpath: configurations.jacoco.asPath)
    >                 report {
    > executiondata {
    >   file(new File("remote.exec"))
    >                         }
    >
    > structure(name: 'server') {
    >   classfiles {
    >           fileset(dir: "dump")
    >   }
    >                         }
    >                         html(destdir: "report")
    >                 }
    >         }
    > }
    >


--
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.

Reply via email to