Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

Unable to dump coverage data

Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am trying to run the generateDump target of the build file, but all I get is the following error

[jacoco:dump] Connecting to localhost/

C:\Users\DGM(IT)\Downloads\Compressed\JaCoCo_KT\JaCoCo_KT\JaCoCo_ANT.xml:15: Unable to dump coverage data

Total time: 0 seconds

The file builds successfully when I run the command
ant -buildfile C:/Users/DGM(IT)/Downloads/Compressed/JaCoCo_KT/JaCoCo_KT/JaCoCo_ANT.xml

What could be the possible reasons why the generateDump target won't work?

I am using jboss-4.2.3. I have added the following jvm option to the run.conf file.
set JAVA_OPTS="%JAVA_OPTS% -javaagent:C:/Users/DGM(IT)/Downloads/Compressed/jacoco-,port=1001"

This is my xml file.

<?xml version="1.0" encoding="UTF-8"?>
<project name="Example" default="" xmlns:jacoco="antlib: org.jacoco.ant">

<taskdef uri="antlib: org.jacoco.ant" resource="org/jacoco/ant/antlib.xml">
<classpath path="C:/Users/DGM(IT)/Downloads/Compressed/jacoco-"/>

<property name="reportLocation" value="${reportLocation}" />
<property name="solutionName" value="${solutionName}" />
<property name="dumpLocation" value="${dumpLocation}"/>
<property name="type" value="${type}"/>
<property name="location" value="${location}"/>

<target name="generateDump">
<jacoco:dump port="1001" destfile="D:/JaCoCoJar/Dump/coverage.exec"/>

<target name="generateReport">


<file file="D:/JaCoCoJar/Dump/coverage.exec"/>

<structure name="FirstCodeCoverage">
<fileset dir="C:/Users/DGM(IT)/workspace">
<include name="mfg.jar"/>
</fileset >

<html destdir="D:/JaCoCoJar/Dump/coverage.html"/>
<xml destfile="D:/JaCoCoJar/Dump/coverage.xml"/>

Ranch Hand
Posts: 358
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's more related to jacoco issue than ant.
So can you execute jacoco outside of ant ?
(and replicate the error)
Tamasa Patra
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I am able to run jacoco outside ant. The coverage.exec file is generated by adding the jvm option (in cmd)
java -javaagent:C:/Users/DGM(IT)/Downloads/Compressed/jacoco-,includes=*,append=true,output=file
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic