how to skip dead address/ports instead of quitting when dumping

16 views
Skip to first unread message

lvhu...@gmail.com

unread,
Oct 8, 2019, 10:16:39 PM10/8/19
to JaCoCo and EclEmma Users
hi, in my build.xml file, I defined multiple address/ports in the 'dump' target, something like:
    <target name="dump">
        <jacoco:dump address="172.29.12.24" port="20435" destfile="${jacocoExecPath}/my-cart-api.exec" reset="false" append="false"/>
        <jacoco:dump address="172.29.12.17" port="20753" destfile="${jacocoExecPath}/my-comment-api.exec" reset="false" append="false"/>
        <jacoco:dump address="172.29.12.25" port="20990" destfile="${jacocoExecPath}/my-detail-api.exec" reset="false" append="false"/>
    </target>

... and use 'ant -buildfile build.xml dump merge report' to generate the report. But, if one of these address/ports is not alive, ant will complain "connection refused" and quit with "unable to dump coverage data".

How can we let ant skip the unreachable address/port and continue to the next one, so that it can finish the whole job?
Thanks.
--huafeng

Marc Hoffmann

unread,
Oct 9, 2019, 2:32:15 AM10/9/19
to jac...@googlegroups.com
Hi,

JaCoCo has no option to ignore connection failures.

You might have a look at the subant tasks which allows to ignore failures (failonerror) in included targets: https://ant.apache.org/manual/Tasks/subant.html

Regards,
-marc


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/e2943164-6680-4d4f-8e81-b8460b4711d3%40googlegroups.com.

Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages