2011-02-23 75 views
2

当我运行我的ANT构建脚本时,Cobertura抱怨以下警告。有了这个,我想知道这是什么意思,我怎么能把它关掉。如何删除特定的Cobertura警告?

[cobertura-instrument] WARN visitEnd, No line number information found for class com.x.y.z.A. Perhaps you need to compile with debug=true?

ANT示例如下:

<target name="instrument" depends="init,compile" > 
    <delete file="cobertura.ser" /> 
    <delete dir="${instrumented}" /> 
    <cobertura-instrument todir="${instrumented}"> 
     <ignore regex="org.apache.log4j.*" /> 
     <fileset dir="${build}" > 
      <include name="**/*.class" /> 
      <exclude name="**/Test*.class" /> 
     </fileset> 
    </cobertura-instrument> 
</target> 

请指教。

回答

1

如cobertura邮件列表中建议here,也许你可以尝试添加调试选项,看看是否有帮助。

<javac debug="true" debuglevel="vars,lines,source"> 
6

设置调试级别似乎不适用于匿名内部类(Cobertura 1.9.4.1)?

[cobertura-instrument] WARN visitEnd, No line number information found for class com.test.MyClass$1. Perhaps you need to compile with debug=true? 
+0

我也看到这个警告只有内部类。任何人都知道如何解决该问题? – Jon 2013-02-25 19:04:00