从调用中断cygwin的批处理文件中第一个命令后? [英] call batch file from cygwin breaks after 1st command?

查看:186
本文介绍了从调用中断cygwin的批处理文件中第一个命令后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有这是pretty长,所以我试图创建一个单一的文件,命令MVN执行一些行家命令的蝙蝠的文件。我把我的bat文件在Cygwin中为:

I'm have a "bat" file with some maven commands which are pretty long so I tried to create a single file with MVN commands to execute. I call my bat file in cygwin as:

$。/ mvncommand.bat

$./mvncommand.bat

样品MVN在我的文件中的命令:

mvn install:install-file -DgroupId=org.openhealthtools.ihe -DartifactId=atna.auditor -Dversion=1.2.0 -Dfile=resources/lib/org.openhealthtools.ihe.atna.auditor_1.2.0.jar -Dpackaging=jar -DgeneratePom=false

mvn install:install-file -DgroupId=org.openhealthtools.ihe -DartifactId=atna.context -Dversion=1.2.0 -Dfile=resources/lib/org.openhealthtools.ihe.atna.context_1.2.0.jar -Dpackaging=jar -DgeneratePom=true

奇怪的是,只有第一个MVN安装被执行,一切正常。但如何使Cygwin的调用指令MVN的休息吗?

Strangely, only the first mvn install is executed and the all is ok. But how to make Cygwin call the rest of the mvn commands?

感谢您。

JR

推荐答案

Maven的( MVN )从另一个批处理文件的批处理文件并运行批处理文件必须用做呼叫

Maven (mvn) is a batch file and running batch files from another batch file must be done with call.

那么改变你有什么成

call mvn ...

和它应该工作。

这无关与Cygwin的,顺便说一句。

This has nothing to do with Cygwin, by the way.

这篇关于从调用中断cygwin的批处理文件中第一个命令后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆