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/8/perl/10.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
调用ant exec命令时未找到文件错误_Ant_Exec - Fatal编程技术网

调用ant exec命令时未找到文件错误

调用ant exec命令时未找到文件错误,ant,exec,Ant,Exec,我有从ant文件调用“Cypress”的简单代码 1) 我已经在path env中配置了cypress路径 2) 我可以从命令提示符的任何位置启动cypress命令 <exec executable="cypress" dir="C:\rockwell\CypressAutomation\node_modules\.bin\cypress"> </exec> 上面的代码给出了一个错误:JAva.io.exception;

我有从ant文件调用“Cypress”的简单代码

1) 我已经在path env中配置了cypress路径

2) 我可以从命令提示符的任何位置启动cypress命令

<exec executable="cypress" 
  dir="C:\rockwell\CypressAutomation\node_modules\.bin\cypress">
</exec>

上面的代码给出了一个错误:JAva.io.exception;在目录“C:\rockwell\CypressAutomation\node\u modules.bin”中找不到cypress


我也试过,没有“dir”属性;导致相同的错误。

只要它包含在系统路径中,它就应该可以工作,因此可能有一些小细节(打字错误、缺少大写字母、缺少文件扩展名等)把它搞乱了。如果做不到这一点,您可以将文件的完整路径放在
executable
属性中,而完全不依赖路径;它给了我不同的错误;“CreateProcess error=193,%1不是有效的Win32应用程序”通过将扩展名添加到命令.cmd来修复它