批处理脚本停止后`gulp`过程完成执行,不会继续执行脚本的其余部分

问题描述:

我试图写一个简单的批处理文件来建立一个一饮而尽项目和一个行家项目。

I am attempting to write a simple batch file to build a gulp project and a maven project.

目前的文件如下:

cd C:\my\file\path
cmd /k gulp maven-deploy-local
cd C:\my\file\path\two\project-pom-parent
cmd /k mvn clean install -Dmaven.test.skip=true

每当我运行此脚本,在命令行第2行后第3行之前,我结束了在看这一行 CMD 带有闪烁光标停:

C:\\我的\\文件\\路径>

C:\my\file\path>

如果我不跑了 CMD / K 文件(如下所示),则只需提示第2行后3线前关闭。

If I run the file without the cmd /k (as follows) then the prompt simply closes after line 2 and before line 3.

cd C:\my\file\path
gulp maven-deploy-local
cd C:\my\file\path\two\project-pom-parent
mvn clean install -Dmaven.test.skip=true

如何修改批处理脚本,这样它会继续并执行线3和4的命令,然后留在下面一行,闪烁的光标开?

How can I modify the batch script so that it will continue and execute the commands on lines 3 and 4 and then remain open with the following line and blinking cursor?

C:\\我\\文件\\路径\\ 2 \\项目-POM父>

C:\my\file\path\two\project-pom-parent>

我正在运行的 Windows 7的64位

这任务是不够具体,使用,以及:

This task is specific enough to use this as well:

cd /d "C:\my\file\path"
cmd /c gulp maven-deploy-local
cd /d "C:\my\file\path\two\project-pom-parent"
cmd /k mvn clean install -Dmaven.test.skip=true

在本质上是第一个 CMD / K 可改为 CMD / C 所以它执行命令,并继续到了最后的命令,这使提示打开。

In essence the first cmd /k can be changed to cmd /c so it executes the command and continues to the last command, which leaves the prompt open.