<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    紙飛機(jī)

      BlogJava :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      22 隨筆 :: 28 文章 :: 30 評(píng)論 :: 0 Trackbacks
    今天在試著在eclipse中使用Ant來(lái)運(yùn)行JUnit進(jìn)行單元測(cè)試時(shí)彈出如下錯(cuò)誤提示,但在外部窗口執(zhí)行Ant時(shí)不會(huì)出現(xiàn)

    BUILD FAILED
    D:\EclipseWorkSpace\message\build.xml:
    11: Could not create task or type of type: junit.

    Ant could not find the task or a 
    class this task relies upon.

    This is common and has a number of causes; the usual 
    solutions are to read the manual pages then download and
    install needed JAR files, or fix the build file: 
     - You have misspelt 'junit'.
       Fix: check your spelling.
     - The task needs an external JAR file to execute
         and this is not found at the right place in the classpath.
       Fix: check the documentation for dependencies.
       Fix: declare the task.
     - The task is an Ant optional task and the JAR file and/or libraries
         implementing the functionality were not found at the time you
         yourself built your installation of Ant from the Ant sources.
       Fix: Look in the ANT_HOME/lib for the 'ant-' JAR corresponding to the
         task and make sure it contains more than merely a META-INF/MANIFEST.MF.
         If all it contains is the manifest, then rebuild Ant with the needed
         libraries present in ${ant.home}/lib/optional/ , or alternatively,
         download a pre-built release version from apache.org
     - The build file was written for a later version of Ant
       Fix: upgrade to at least the latest release version of Ant
     - The task is not an Ant core or optional task 
         and needs to be declared using <taskdef>.
     - You are attempting to use a task defined using 
        <presetdef> or <macrodef> but have spelt wrong or not 
       defined it at the point of use

    Remember that for JAR files to be visible to Ant tasks implemented
    in ANT_HOME/lib, the files must be in the same directory or on the
    classpath

    Please neither file bug reports on this problem, nor email the
    Ant mailing lists, until all of these causes have been explored,
    as this
     is not an Ant bug.

    按著錯(cuò)誤提示將JUnit.jar放在ANT_HOME/lib中還是同樣出現(xiàn)上述錯(cuò)誤提示
    這是因?yàn)?lt;junit>任務(wù)在ant中是一個(gè)optinal task,非core task,需要junit.jar支持

    解決方法:在window --> preferences --> Ant --> Runtime --> Classpath中選擇Global Entries,然后添加JUnit.jar文件即可,以便eclipse在運(yùn)行ant任務(wù)時(shí)會(huì)加載junit.jar,這樣就可以解決上述問(wèn)題現(xiàn)象,其實(shí)這里也可以將JUnit.jar文件放在Ant Home Entries,但這樣有可能造成與Ant本身包的混淆.


    ok

    posted on 2007-07-19 22:41 紙飛機(jī) 閱讀(2051) 評(píng)論(3)  編輯  收藏

    評(píng)論

    # re: Eclipse中使用Ant來(lái)運(yùn)行Junit的錯(cuò)誤及解決方法 2008-07-22 15:15 yhmymemory
    剛才試了一下很好.  回復(fù)  更多評(píng)論
      

    # re: Eclipse中使用Ant來(lái)運(yùn)行Junit的錯(cuò)誤及解決方法[未登錄](méi) 2008-12-05 11:03 user
    謝謝  回復(fù)  更多評(píng)論
      

    # re: Eclipse中使用Ant來(lái)運(yùn)行Junit的錯(cuò)誤及解決方法[未登錄](méi) 2009-07-24 11:25 ling
    很不錯(cuò)。最近正為這個(gè)郁悶,現(xiàn)在解決了  回復(fù)  更多評(píng)論
      


    只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


    網(wǎng)站導(dǎo)航:
     
    主站蜘蛛池模板: 3d成人免费动漫在线观看| 亚洲综合色区中文字幕| 91香焦国产线观看看免费| 亚洲狠狠ady亚洲精品大秀| 麻豆国产VA免费精品高清在线 | JLZZJLZZ亚洲乱熟无码| 免费无码又爽又刺激高潮视频| 亚洲中文字幕无码mv| 亚洲精品无码乱码成人| 噼里啪啦电影在线观看免费高清| 午夜在线免费视频| 亚洲国产精品线观看不卡| 亚洲一区无码精品色| 91在线品视觉盛宴免费| 日本一区午夜艳熟免费| 亚洲av色福利天堂| 亚洲av鲁丝一区二区三区| 免费毛片网站在线观看| 免费一级毛片无毒不卡| 午夜亚洲国产精品福利| 亚洲手机中文字幕| 亚洲精品成人网站在线观看| 国内外成人免费视频| 国产成人久久AV免费| 午夜在线免费视频| 亚洲人成网亚洲欧洲无码| 亚洲国产日韩一区高清在线| 亚洲精品A在线观看| 久久精品国产亚洲5555| 国国内清清草原免费视频99| a级毛片免费播放| 最新亚洲人成无码网www电影| 亚洲嫩草影院在线观看| 亚洲av中文无码乱人伦在线播放 | 91亚洲一区二区在线观看不卡| 国产一级淫片视频免费看| 精品久久久久久久久免费影院| 免费视频精品一区二区三区 | 91频在线观看免费大全| a级毛片免费在线观看| 一级女人18片毛片免费视频|