Chinaunix首页 | 论坛 | 博客
  • 博客访问: 475570
  • 博文数量: 122
  • 博客积分: 1403
  • 博客等级: 中尉
  • 技术积分: 1668
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-11 13:31
文章分类

全部博文(122)

文章存档

2018年(5)

2017年(12)

2014年(15)

2013年(33)

2012年(4)

2011年(53)

分类: Python/Ruby

2011-03-04 13:01:55

  官方手册链接:

 如果没有指定特定的构建脚本,Ant将寻找当前目录下的build.xml,若找到,则把它作为构建脚本运行。若需要指定其他的构建脚本,需要在命令行加入选项 -builfile file,其中,file是你指定的构建脚本名称。

ant [options] [target [target2 [target3] ...]] Options: -help, -h print this message -projecthelp, -p print project help information -version print the version information and exit -diagnostics print information that might be helpful to diagnose or report problems. -quiet, -q be extra quiet -verbose, -v be extra verbose -debug, -d print debugging information -emacs, -e produce logging information without adornments -lib specifies a path to search for jars and classes -logfile use given file for log -l '' -logger the class which is to perform logging -listener add an instance of class as a project listener -noinput do not allow interactive input -buildfile use given buildfile -file '' -f '' -D= use value for given property -keep-going, -k execute all targets that do not depend on failed target(s) -propertyfile load all properties from file with -D properties taking precedence -inputhandler the class which will handle input requests -find (s)earch for buildfile towards the root of -s the filesystem and use it -nice number A niceness value for the main thread: 1 (lowest) to 10 (highest); 5 is the default -nouserlib Run ant without using the jar files from ${user.home}/.ant/lib -noclasspath Run ant without using CLASSPATH -autoproxy Java 1.5+ : use the OS proxies -main override Ant's normal entry point Examples
ant

runs Ant using the build.xml file in the current directory, on the default target.

ant -buildfile test.xml

runs Ant using the test.xml file in the current directory, on the default target.

ant -buildfile test.xml dist

runs Ant using the test.xml file in the current directory, on the target called dist.

ant -buildfile test.xml -Dbuild=build/classes dist

runs Ant using the test.xml file in the current directory, on the target called dist, setting the build property to the value build/classes.

ant -lib /home/ant/extras

runs Ant picking up additional task and support jars from the /home/ant/extras location

ant -lib one.jar;another.jarant -lib one.jar -lib another.jar

adds two jars to Ants classpath.

 

 

阅读(934) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~