`
nanjingjiangbiao_T
  • 浏览: 2605351 次
  • 来自: 深圳
文章分类
社区版块
存档分类
最新评论

Problem: failed to create task or type cobertura-report Cause: The name is undefined.

 
阅读更多

BUILD FAILED
/opt/build.xml:19: Problem: failed to create task or type cobertura-report
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any <presetdef>/<macrodef> declarations have taken place.

解决办法:设置jar的引入路径:

第一步,将cobertura.jar以及Cobertura/lib下的所有jar引入classpath
  1. <pathid="lib.classpath">
  2. <filesetdir="${lib.dir}">
  3. <includename="**/*.jar"/>
  4. </fileset>
  5. </path>
注:lib.dir是你存放cobertura.jar以及/Conbertura/lib/*.jar的地方

第二步,将cobertura自身定义的task引入到ant脚本中
1.<taskdefclasspathref="lib.classpath"resource="tasks.properties"/>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics