关于ant的一个问题.

esunboy 2006-03-08 11:50:30
能否在ant命令行输入参数, 在build.xml文件中可以获取这些参数?

如:ant compile "A" "B" "D"
...全文
144 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
cleansunshing 2006-03-09
  • 打赏
  • 举报
回复
学习
pdvv 2006-03-09
  • 打赏
  • 举报
回复
ant -Daaa=123 …


<echo>${aaa}</echo>
doway 2006-03-08
  • 打赏
  • 举报
回复
C:\>ant -?
Unknown argument: -?
ant [options] [target [target2 [target3] ...]]
Options:
-help print this message
-projecthelp 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 print debugging information
-emacs produce logging information without adornments
-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
-buildfile <file> use given buildfile
-file <file> ''
-f <file> ''
-D<property>=<value> use value for given property
-propertyfile <name> load all properties from file with -D
properties taking precedence
-inputhandler <class> the class which will handle input requests
-find <file> search for buildfile towards the root of the
filesystem and use it

注意其中的:
-D<property>=<value> use value for given property
-propertyfile <name> load all properties from file with -D

62,629

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧