使用 Ant 目标而不是 exec 开始停止 JBoss 服务器并传递运行脚本,即
构建.xml
<target="start-jboss" description="Starts JBoss instance" depends="prepare">
<exec dir="${jboss.home}/bin" executable="cmd.exe" os="Windows07">
<arg line="/c run.bat -S"/>
<env key="NOPAUSE" value="true"/>
</exec>
</target>