Skip to content

Instantly share code, notes, and snippets.

@vgrichina
Created August 21, 2012 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vgrichina/3416221 to your computer and use it in GitHub Desktop.
Save vgrichina/3416221 to your computer and use it in GitHub Desktop.
Deploy webapp to Tomcat on remote Windows machine
echo on
sc \\%SERVER_NAME% stop Tomcat7
rmdir /q /s %WEBAPPS_DIR%\%TARGET_PATH%
copy %WAR_FILE% %WEBAPPS_DIR%\%TARGET_PATH%.war
if errorlevel 1 goto Error
sc \\%SERVER_NAME% start Tomcat7
if errorlevel 1 goto Error
exit 0
:Error
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment