本文介绍了更改 Clover 检测类的位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Clover 2.5,我有一个目标可以打包二进制文件.但是,目前,似乎 Clover 检测的类与我希望打包在 jar 中的未检测的类在同一输出目录中生成.

I'm using Clover 2.5 and I've got a target that will package up the binary files. However, at the moment, it seems that the Clover instrumented classes are being generated in the same output directory as the un-instrumented classes that I wish to package up in a jar.

如何创建 jar 以便不包含检测类?有没有办法改变仪器类的输出位置?还是打包不包含检测类的 jar 的唯一方法是再次重新编译所有内容?

How do I go about creating a jar so that the instrumented classes are not included? Is there a way to change where the instrumented classes are spat out? Or is the only way to package up a jar that does not include the instrumented classes is to re-compile everything again?

我尝试使用 clover-setup 目标的 tmpdir 属性,但似乎没有任何效果.

I tried using the tmpdir attribute of the clover-setup target but that did not seem to have any effect.

推荐答案

如果您使用 Ant 手动执行此操作,请使用 任务而不是 .<clover-instr> 有一个 destdir 属性,它是Clover 将在其中写入源代码检测副本的目录".

If you're doing this manually with Ant, use the <clover-instr> task instead of <clover-setup>. <clover-instr> has a destdir attribute that is the "directory into which Clover will write an instrumented copy of the source code".

如果您使用 Eclipse 来解决所有这些问题,Clover 文档 说您可以右键单击您的项目并选择属性,选择 Clover,选择编译选项卡,选择'用户指定的文件夹',然后选择您希望检测类 [要输出] 的项目目录".

If you're using Eclipse to kick all of this off, the Clover documentation says that you can "right click on your project and select properties, select Clover, select Compilation tab, select 'User specified folder' and then select a project directory where you wish instrumented classes [to be output]".

这篇关于更改 Clover 检测类的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-21 22:55