@echo off

set deployDir=%1\@project.artifactId@
if %deployDir%=="" set deployDir=d:\webroot\@project.artifactId@

set curr_file=%cd%
cd /d %deployDir%
call stop.bat
sc query @project.artifactId@ |Find  "RUNNING" && ping 127.0.0.1 -n 10 >nul
cd %curr_file%
rd/s/q %deployDir%\lib
rd/s/q %deployDir%\dataConfig
rd/s/q %deployDir%\config
del /s/q %deployDir%\*.jar
xcopy /Y/E/I * %deployDir%

cd /d %deployDir%
call auto.bat
cd %curr_file%

