Ant的安装和使用
来源:互联网 发布:源码baiboku 编辑:程序博客网 时间:2024/05/21 10:06
1、ant是什么?
是一个将软件编译、测试、部署等步骤联系在一起加以自动化的一个工具
2、下载安装
http://blog.csdn.net/Lanyangyangb/article/details/73610280?locationNum=6&fps=1
3、在eclipce中的使用
准备工作:
项目右键——new——folder——folder name: lib
将testng-6.8.5.jar 、jcommander.jar 放入lib
项目右键——new——file——build.xml (文件名不能写错)
放入代码
<?xml version="1.0" encoding="UTF-8" ?><project name="HelloWorld" default="regression" basedir="."><property name="src" value="src"/><property name="dest" value="classes"/><property name="testng.dir" value="${basedir}\lib"/><property name="testng.output.dir" value="${basedir}\test-output"/> <path id="class1"> <fileset dir="${basedir}\lib" includes="*jar"/> <pathelement location="${dest}"/> <pathelement location="${src}"/> </path><taskdef resource="testngtasks" classpath="${testng.dir}/testng-6.8.5.jar"/><target name="init"> <delete dir="${dest}"/> <mkdir dir="${dest}"/></target><target name="compile" depends="init"> <javac srcdir="${src}" destdir="${dest}" classpathref="class1" encoding="UTF8" includeantruntime="off" debug="on" debuglevel="lines,vars,source"/></target><target name="regression" depends="compile"> <echo>running testng</echo> <testng outputdir="${testng.output.dir}" classpathref="class1" delegateCommandSystemProperties="true"> <xmlfileset dir="${basedir}" includes="testng.xml"/> </testng></target></project>
4、运行build.xml
可以右键Run As——Ant build
也可以用cmd进入build.xml所在目录,使用ant命令
阅读全文
0 0
- Ant的安装和使用
- Ant的安装和使用
- Ant 的安装和使用教程
- Ant的安装和使用---基础
- Ant安装、配置和使用
- ant安装和ant的环境配置
- ant安装和ant的环境配置
- ant安装和ant的环境配置
- CruiseControl和ant for c/c++的安装使用
- windows和Ubuntu下Ant的安装使用
- apache-ant 工具的安装和简单使用
- Windows下Ant的安装和配置使用教程
- J2EE环境搭建(四)Ant的安装和使用
- FindBugs作为eclipse插件和ant工具的安装、使用
- vi使用、Ant安装配置、Junit和Sonar的学习心得
- ant的安装以及使用
- Ant的安装与使用
- ANT 的安装和配置
- Git学习记录
- putty-连接服务器
- ijkplayer 入门之Error事件源码简单跟踪
- 共享免费生活代码
- 自学OPENCV+PYTHON+MACOS-X(4)图形金字塔进行苹果和橘子融合详解
- Ant的安装和使用
- 下载配置ACE网络库流程
- AppCan下拉刷新的代码
- 多线程注意事项
- 照片处理小工具三合一设计到实现(三)
- 根据下拉框排序,自定义过滤器,添加,查询等操作
- Jenkins入门系列之——01第一章 Jenkins是什么?
- ajax+php超时操作,延时返回数据
- leetcode 724 Find Pivot Index