ant的核心文件,build.xml(根据需要可以使用别的xml文件,但一般标准规范要求以build命名)
在没有指定的情况下ant会再当前目录中寻找build.xml文件。如果你想使用其他文件作为ant的入口,ant -buildfile xmlfilename
ant命令
D:\soft\liyixing\ant\apache-ant-1.8.2\bin>ant --help
Unknown argument: --help
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 <path> specifies a path to search for jars and classes
-logfile <file> use given file for log
-l <file> ''
-logger <classname> the class which is to perform logging
-listener <classname> add an instance of class as a project listener
-noinput do not allow interactive input
-buildfile <file> use given buildfile
-file <file> ''
-f <file> ''
-D<property>=<value> use value for given property
-keep-going, -k execute all targets that do not depend
on failed target(s)
-propertyfile <name> load all properties from file with -D
properties taking precedence
-inputhandler <class> the class which will handle input requests
-find <file> (s)earch for buildfile towards the root of
-s <file> 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 Java1.5+: use the OS proxy settings
-main <class> override Ant's normal entry point
-help显示ant命令的帮助
-projecthelp
显示包含在构建文件中的帮助文档。即每个target(目录)元素中description属性值。和description元素中的文本内容。将有description属性的target列为主目标(Main target)
没有这个属性的列为子目标
-version显示ant的版本,如
D:\soft\liyixing\ant\apache-ant-1.8.2\bin>ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
-quiet 减少构建中信息输出。只显示构建文件中的echo任务的消息
-verbose显示构建过程中每个操作的详细消息。和-debug选项相互排斥
-debug
显示ant和任务开发人员已经标志为调试消息的消息。和-verbose排斥
-emacs 对日志消息进行格式化,使他们能够很容易地由Emacs的shell模式所解析。
-logfile filename将日志写到指定路径
-logger classname指定一个类来处理ant的日志记录。这个类必须实现了org.apache.tools.ant.BuildLogger接口
-listener classname
为ant生命一个监听器,添加这个监听器到监听列表。
-buildfile filename
指定ant的构建文件。如果不写这个选项,ant默认会寻找build.xml文件
-D<property>=<value>定义一个以键值对(key=xxx)的变量
-find filename指定ant应当处理的构建文件。与buildfile选项不同,-find如果未找到的话,它会到父目录中再进行搜索。直到到了根目录未知。未找到,则失败。
在没有指定的情况下ant会再当前目录中寻找build.xml文件。如果你想使用其他文件作为ant的入口,ant -buildfile xmlfilename
ant命令
D:\soft\liyixing\ant\apache-ant-1.8.2\bin>ant --help
Unknown argument: --help
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 <path> specifies a path to search for jars and classes
-logfile <file> use given file for log
-l <file> ''
-logger <classname> the class which is to perform logging
-listener <classname> add an instance of class as a project listener
-noinput do not allow interactive input
-buildfile <file> use given buildfile
-file <file> ''
-f <file> ''
-D<property>=<value> use value for given property
-keep-going, -k execute all targets that do not depend
on failed target(s)
-propertyfile <name> load all properties from file with -D
properties taking precedence
-inputhandler <class> the class which will handle input requests
-find <file> (s)earch for buildfile towards the root of
-s <file> 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 Java1.5+: use the OS proxy settings
-main <class> override Ant's normal entry point
-help显示ant命令的帮助
-projecthelp
显示包含在构建文件中的帮助文档。即每个target(目录)元素中description属性值。和description元素中的文本内容。将有description属性的target列为主目标(Main target)
没有这个属性的列为子目标
-version显示ant的版本,如
D:\soft\liyixing\ant\apache-ant-1.8.2\bin>ant -version
Apache Ant(TM) version 1.8.2 compiled on December 20 2010
-quiet 减少构建中信息输出。只显示构建文件中的echo任务的消息
-verbose显示构建过程中每个操作的详细消息。和-debug选项相互排斥
-debug
显示ant和任务开发人员已经标志为调试消息的消息。和-verbose排斥
-emacs 对日志消息进行格式化,使他们能够很容易地由Emacs的shell模式所解析。
-logfile filename将日志写到指定路径
-logger classname指定一个类来处理ant的日志记录。这个类必须实现了org.apache.tools.ant.BuildLogger接口
-listener classname
为ant生命一个监听器,添加这个监听器到监听列表。
-buildfile filename
指定ant的构建文件。如果不写这个选项,ant默认会寻找build.xml文件
-D<property>=<value>定义一个以键值对(key=xxx)的变量
-find filename指定ant应当处理的构建文件。与buildfile选项不同,-find如果未找到的话,它会到父目录中再进行搜索。直到到了根目录未知。未找到,则失败。