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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/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
Batch file 如何向调用ANT的bat文件传递多个参数_Batch File_Ant_Parameter Passing - Fatal编程技术网

Batch file 如何向调用ANT的bat文件传递多个参数

Batch file 如何向调用ANT的bat文件传递多个参数,batch-file,ant,parameter-passing,Batch File,Ant,Parameter Passing,你能帮我解决以下问题吗?我有custom.bat文件。我每次为它设置3个参数。我想让这个过程自动化。我尝试了以下命令custom.bat

你能帮我解决以下问题吗?我有
custom.bat
文件。我每次为它设置3个参数。我想让这个过程自动化。我尝试了以下命令
custom.bat
test.txt
文件包含以下内容:

no
form_app
no
但只有第一个参数被重定向到custom.bat文件。如何将所有参数重定向到custom.bat文件?这是我的批处理文件:

@echo off
call ..\setenv.cmd
set JAVA_HOME=%LYRA_JAVA_HOME%
set tmp=%CLASSPATH%
set CLASSPATH=.;%CLASSPATH%
ant\bin\ant.bat -f custom.xml -quiet %1 %2 %3 %4 %5 
set CLASSPATH=%tmp%

这是custom.bat文件@echo off call..\setenv.cmd set JAVA_HOME=%LYRA_JAVA_HOME%set tmp=%CLASSPATH%set CLASSPATH=。;%类路径%ant\bin\ant.bat-f custom.xml-quiet%1%2%3%4%5设置类路径=%tmp%t它不是简单的
custom.bat没有表单\u应用程序号
?@TripeHound,不,它会认为这些是构建目标。应该是
custom.bat-DsomeName=no-DsomeName=form_app-DsomeName=no
可能的副本非常感谢,它可以工作这是custom.bat文件@echo off call..\setenv.cmd set JAVA_HOME=%LYRA_JAVA_HOME%set tmp=%CLASSPATH%set CLASSPATH=。;%类路径%ant\bin\ant.bat-f custom.xml-quiet%1%2%3%4%5设置类路径=%tmp%t它不是简单的
custom.bat没有表单\u应用程序号
?@TripeHound,不,它会认为这些是构建目标。应该是
custom.bat-DsomeName=no-DsomeName=form\u app-DsomeName=no
非常感谢,它很有效