选中Hello工程,然后选择“Project”,“Properties”,“Builders”,“New…”,选择“Ant Build”:
填入Name:Ant_Builder;Buildfile:build.xml;Base Directory:${workspace_loc:/Hello}(按“Browse Workspace”选择工程根目录),由于用到了junit.jar包,搜索Eclipse目录,找到junit.jar,把它复制到Hello/lib目录下,并添加到Ant的Classpath中:
然后在Builder面板中钩上Ant_Build,去掉Java Builder:
延伸阅读
文章来源于领测软件测试网 https://www.ltesting.net/