Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/5.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
Maven 如何更改批处理文件中的目录?_Maven_Batch File - Fatal编程技术网

Maven 如何更改批处理文件中的目录?

Maven 如何更改批处理文件中的目录?,maven,batch-file,Maven,Batch File,我有一个如下的批处理文件 E: cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\core mvn clean install cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\handset mvn clean install 它将为core运行mvn install命令 但它不会为手持设备项目执行mvn install命令。尝试如下

我有一个如下的批处理文件

E:

cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\core

mvn clean install

cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\handset

mvn clean install
它将为core运行
mvn install
命令

但它不会为手持设备项目执行
mvn install
命令。

尝试如下操作:

pushd "E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\core"
mvn clean install
popd

pushd "cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\handset"
mvn clean install
popd

这是更改驱动器和文件夹的另一种方法

如果mvn是批处理文件,
call
命令用于解决该问题

cd /d "E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\core"
call mvn clean install

cd /d "cd E:\cvs-projects-command\customers\prd_mno_nfc_wallet\server\handset"
call mvn clean install

mvn必须同时存在于这两个文件夹中才能运行。

手机文件夹中是否存在mvn?是批处理文件吗?