前提:
在Eclipse中使用ant執(zhí)行build.xml文件來(lái)執(zhí)行testng用例,因遇到問(wèn)題,故了解了一些關(guān)于在Eclipse中使用ant插件的小知識(shí),總結(jié)一下。
首先,Eclipse中默認(rèn)會(huì)自帶ant插件,我們也可能對(duì)ant插件進(jìn)行升級(jí)。
那么ant插件在Eclipse中應(yīng)該怎么正確設(shè)置呢?
1、菜單欄中打開(kāi)Window-Preferences-Ant-Runtime
總共需要設(shè)置兩項(xiàng):
1、Ant Home Entries(Default),點(diǎn)擊Ant Home,選擇ant插件路徑:
D:\software\eclipse-jee-kepler-R-win32\eclipse\plugins\org.apache.ant_1.8.4.v201303080030
2、設(shè)置Global Entries路徑,即為jdk中tools.jar路徑
然后就可以執(zhí)行ant文件了。