ant property expansion & conditional execution

15 views
Skip to first unread message

mazas...@gmail.com

unread,
Feb 12, 2018, 11:54:44 AM2/12/18
to JaCoCo and EclEmma Users
Hi

1) It looks to me that ant properties are not expanded in the jacoco:agent task, as in:
<jacoco:agent property="jacocoagentvmparam"
enabled=${dojacoco}
destfile=${execfile}
classdumpdir=${dumpdir}
append="true" />
Am I wrong ?

2) I would like to have in my build file a default full target (chaining many generations/compilations/executions) not doing code coverage and a similar target doing code coverage.
The <coverage> wrapper does not work on targets.
I'd like not duplicate all java targets to have them wrapped and not wrapped by coverage or set and not set with the agent parameters, like:

<target name="run_tpt">
<java failonerror="true"
fork="true"
classname=...
classpath=...>
</java>
</target>
<target name="run_tpt_cc">
<java failonerror="true"
fork="true"
classname=...
classpath=...>
<!-- jacocoagent vm arguments -->
<jvmarg value="${jacocoagentvmparam}" />
</java>
</target>

Is there a simple way to do this ?

Thanks in advance.

Marc Hoffmann

unread,
Feb 14, 2018, 12:04:22 PM2/14/18
to jac...@googlegroups.com
Hi Marc,

the examples that ship with JaCoCo and are linked with from
documentation use properties and do work:

http://www.jacoco.org/jacoco/trunk/doc/

To analyze your problem we need a executable minimal reproducer (e.g.
github project). A good starting point would be our example:

http://www.jacoco.org/jacoco/trunk/doc/examples/build/build.xml

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