JAVA下ant的配置
来源:互联网 发布:麟龙四色谱指标源码 编辑:程序博客网 时间:2024/05/20 13:07
下载http://www.apache.org/dist/ant/binarie或http://ant.apache.org/bindownload.cgi下的apache-ant-1.7.1-bin.zip
接压安装。
ant的配置:
1。解压ant的包到本地目录。
2。在环境变量中设置ANT_HOME,值设为你的安装目录。
3。在环境变量中设置JAVA_HOME,值设为你的jdk安装目录。
4。把ANT_HOME/bin加到你系统的path目录中去。
SET ANT_HOME=D:/jakarta-ant-1.7.1 //注意是Ant的安装目录,不是bin子目录
SET PATH=%PATH%;%ANT_HOME%/bin;
在cmd模式下输入 ant -version回车,看到输出说明配置成功。
运行Ant非常简单,(当你正确地安装Ant后)只要输入ant就可以了。
ex:>ant -version
Apache Ant version 1.7.1 compiled on June 27 2008
n 没有指定任何参数时,Ant会在当前目录下查询build.xml文件。如果找到了就用该文件作为buildfile。如果你用 -find 选项。Ant就会在上级目录中寻找buildfile,直至到达文件系统的根。要想让Ant使用其他的buildfile,可以用参数 -buildfile file,这里file指定了你想使用的buildfile。
n 可以指定执行一个或多个target。当省略target时,Ant使用标签<project>的default属性所指定的target。
命令行选项总结:
ant [options] [target [target2 [target3] ...]]
Options:
-help print this message
-projecthelp print project help information
-version print the version information and exit
-quiet be extra quiet
-verbose be extra verbose
-debug print debugging information
-emacs produce logging information without adornments
-logfile file use given file for log output
-logger classname the class that is to perform logging
-listener classname add an instance of class as a project listener
-buildfile file use specified buildfile
-find file search for buildfile towards the root of the filesystem and use the first one found
-Dproperty=value set property to value
例子
ant
使用当前目录下的build.xml运行Ant,执行缺省的target。
ant -buildfile test.xml
使用当前目录下的test.xml运行Ant,执行缺省的target。
ant -buildfile test.xml dist
使用当前目录下的test.xml运行Ant,执行一个叫做dist的target。
ant -buildfile test.xml -Dbuild=build/classes dist
使用当前目录下的test.xml运行Ant,执行一个叫做dist的target,并设定build属性的值为build/classes。
- JAVA下ant的配置
- Java下的ant配置
- windows下Java的build工具--Ant的安装配置
- Windows下ANT的配置
- Centos下ant的配置
- Win7下安装,配置Java, Ant,Maven
- Windows下Ant的环境配置
- Windows下 ANT的安装和配置
- Ant在windows下的配置
- WindowS下Ant的安装与配置
- Windows 下 Apache Ant的配置方法
- Win7下Ant的安装与配置
- Windows下,Apache Ant的配置
- ubuntu下ant的安装配置
- ant在linux下的配置
- WindowS下Ant的安装与配置
- Win7下Ant的安装与配置
- centos下ant的安装和配置
- 工作是生活的一部分(2)
- ASP.NET中获取URL
- Oracle 数据导入导出imp/exp 使用详解
- 架构设计——业务逻辑
- 【转】如何向线程传递参数
- JAVA下ant的配置
- C#在Form中嵌入并且操作Excel表格
- PowerPoint使用的点滴体会
- Java并发编程基础知识片段
- 视频:余晟,霍太稳,做客“边看边读”聊韩磊新译著《梦断代码》(图)
- javascript获取url参数,返回参数值
- 投入Linux的怀抱 你准备好了吗?
- 对于不返回任何键列信息的 SelectCommand 不支持 UpdateCommand 的动态 SQL 生成,异常
- msdn 中文期刊,让我们紧跟时代步伐