The objective of my batch file is to do “mvn clean install”, copy some environment files somewhere, then start the localhost server.
This is my batch file:
REM # change the following dirs accordingly
set webapp_dir=C:\cygwin\home\git\new_trunk
echo "moving to webapps project dir"
cd %webapp_dir%
echo "mvn clean install"
mvn clean install
---------------------it seems to finish the maven install then just stops
---------------------------i dont really wanna write 2 batch files just for this
set env_dir=C:\cygwin\home\git\new_trunk\etc\environment\dev\yao
set class_dir=C:\cygwin\home\git\new_trunk\webapps-dist\target\classes
cd %env_dir%
copy /y env.conf.bat %class_dir%
echo "copying env.conf file"
msg * maven install complete, the env.conf has been copied
set run_dir=C:\cygwin\home\git\new_trunk\webapps-dist\target\classes\jboss-as\bin
cd %run_dir%
echo "starting the server, run server 0.0.0.0"
run.bat -c server -b 0.0.0.0
When I say stop i mean 
So it there a way to run everything here in one batch file?
Try changing
mvn clean installtocall mvn clean install.If
mvnis another batch file, control won’t get returned to your original batch file unless you explicitly call it withcall.