2010-06-03 84 views
0

我試圖利用的Cobertura排除一些類:從的Cobertura報告剔除一些類不起作用

<cobertura-instrument todir="${voldemort.instrumented.dir}" datafile="${cobertura.instrument.file}"> 
    <classpath refid="tools-classpath" /> 
       <ignore regex=".*\.xsd" /> 
       <fileset dir="${voldemort.dist.dir}/classes"> 
        <include name="**/*.class" /> 
        <exclude name="**/client/protocol/pb/*.class"/> 
        <exclude name="**/server/http/*.class"/> 
      </fileset> 
     </cobertura-instrument> 

然而,這不起作用。我不知道問題出在哪裏。你可以幫幫我嗎?

回答

0

你必須做,是這樣的:

<cobertura-instrument todir="${voldemort.instrumented.dir}" datafile="${cobertura.instrument.file}"> 
    <classpath refid="tools-classpath" /> 
    <ignore regex=".*\.xsd" /> 
    <fileset dir="${voldemort.dist.dir}/classes"> 
     <include name="**/*.class" /> 
    </fileset> 

    <fileset dir="${voldemort.dist.dir}/classes"> 
     <exclude name="**/client/protocol/pb/*.class"/> 
    </fileset> 

    <fileset dir="${voldemort.dist.dir}/classes"> 
     <exclude name="**/server/http/*.class"/> 
    </fileset> 
</cobertura-instrument>