ant property expansion & conditional execution

已查看 15 次
跳至第一个未读帖子

mazas...@gmail.com

未读,
2018年2月12日 11:54:442018/2/12
收件人 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

未读,
2018年2月14日 12:04:222018/2/14
收件人 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
回复全部
回复作者
转发
此会话已锁定
您无法回复已锁定的会话,亦不可对其执行其他操作。
0 个新帖子