更改 Clover 仪器类的位置
我正在使用 Clover 2.5,并且我有一个可以打包二进制文件的目标。然而,目前看来,Clover 检测类是在与我希望打包在 jar 中的未检测类相同的输出目录中生成的。
我该如何创建一个 jar 以便不包含检测的类?有没有办法改变检测类的吐出位置?或者打包不包含检测类的 jar 的唯一方法是重新编译所有内容?
我尝试使用 clover-setup 目标的 tmpdir 属性,但这似乎没有任何效果。
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.
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?
I tried using the tmpdir attribute of the clover-setup target but that did not seem to have any effect.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 Ant 手动执行此操作,请使用
;
任务而不是
。
有一个destdir
属性,它是“Clover 将在其中写入源代码的检测副本的目录”。如果您使用 Eclipse 来启动这一切,Clover 文档 表示您可以“右键单击您的项目并选择属性,选择 Clover,选择编译选项卡,选择“用户指定的文件夹”,然后选择您希望在其中输出检测类的项目目录”。
If you're doing this manually with Ant, use the
<clover-instr>
task instead of<clover-setup>
.<clover-instr>
has adestdir
attribute that is the "directory into which Clover will write an instrumented copy of the source code".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]".