@ECHO OFF
@REM 部署WEB系統(tǒng)到Tomcat
set date=%date:~0,10%
set time=%time:~0,8%
set currDate=%date% %time%
echo 開始運(yùn)行將工作空間里面編譯后的代碼拷貝到Tomcat中...%currDate%
echo 設(shè)置參數(shù)
set WORK_SPACE=J:\飄\IT\workspace
set PRJ_NAME=MyStruts1Prj
set PRJ_WEB_ROOT=MyStruts1Prj\WebContent
set BIN=build
set CATALINA_HOME=J:\飄\IT\tools\tomcat6_0_3_5
set WEB_NAME=webapp
@REM 刪除之前的
echo 刪除之前存在的
cd %CATALINA_HOME%\webapps
if exist %WEB_NAME% rd /s /q %WEB_NAME%
@REM 新建
md %WEB_NAME%
@REM 拷貝工程中編譯好的文件到Tomcat
echo 拷貝工程中編譯好的文件到Tomcat\webapps
xcopy %WORK_SPACE%\%PRJ_WEB_ROOT% %CATALINA_HOME%\webapps\%WEB_NAME% /S /E /F /A
xcopy %WORK_SPACE%\%PRJ_NAME%\%BIN% %CATALINA_HOME%\webapps\%WEB_NAME%\WEB-INF /S /E /F /A
@REM 啟動(dòng)Tomcat
echo 啟動(dòng)Tomcat
cd %CATALINA_HOME%\bin
call startup.bat