Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Shell 如何设置ant属性;“output.root”;在贝壳里?_Shell_Ant_Cygwin - Fatal编程技术网

Shell 如何设置ant属性;“output.root”;在贝壳里?

Shell 如何设置ant属性;“output.root”;在贝壳里?,shell,ant,cygwin,Shell,Ant,Cygwin,我需要从Cygwin shell中指定ant属性output.root,因为我无法编辑build.xml。目前,我正在尝试导出一个环境变量,如 导出输出。root=“/d/output” 但这给了我一个错误: 导出:`output.root=/d/output':不是有效的标识符 我做错了什么?标识符中只允许使用ASCII字母数字字符和下划线。必须从变量名中删除,或将其替换为 更新 Ant属性不是shell变量。必须使用-D在ant的命令行中指定ant属性: ant -Doutput.root=

我需要从Cygwin shell中指定ant属性
output.root
,因为我无法编辑
build.xml
。目前,我正在尝试导出一个环境变量,如

导出输出。root=“/d/output”

但这给了我一个错误:

导出:`output.root=/d/output':不是有效的标识符


我做错了什么?

标识符中只允许使用ASCII字母数字字符和下划线。

必须从变量名中删除
,或将其替换为

更新

Ant属性不是shell变量。必须使用
-D
ant
的命令行中指定ant属性:

ant -Doutput.root="/d/output" target1

要从命令行设置ant属性,应使用以下语法

ant -D<property>=<value> [target [target2 [target3] ...]]
ant-D=[target[target2[target3]…]

引用:.

您是否试图从命令行设置Java属性?ant使用此属性。我无法编辑build.xml文件。这就是我需要设置它的原因。这个prorerty被ant使用。我不能改变它的名字