Created
May 4, 2012 13:11
-
-
Save chgeuer/2594724 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set BASE=C:\T | |
set TOMCAT_VERSION=7.0.27 | |
set WAR_NAME=HelloWorld.war | |
set JRE_LOCALZIP=jdk.zip | |
set JAVA_HOME=%BASE%\jre | |
set PATH=%PATH%;%JAVA_HOME%\bin | |
set TOMCAT_LOCALZIP=apache-tomcat-%TOMCAT_VERSION%-windows-x64.zip | |
set CATALINA_HOME=%BASE%\apache-tomcat-%TOMCAT_VERSION% | |
REM ***** rmdir /s %BASE% | |
mkdir %BASE% | |
mkdir %JAVA_HOME% | |
REM | |
REM Unzip JRE | |
REM | |
cscript /NoLogo util\unzip.vbs %JRE_LOCALZIP% %JAVA_HOME% | |
REM | |
REM Download (if needed) and unzip Tomcat | |
REM | |
IF EXIST %TOMCAT_LOCALZIP% GOTO SKIPTOMCATDOWNLOAD | |
cscript /NoLogo "util\download.vbs" "http://archive.apache.org/dist/tomcat/tomcat-7/v%TOMCAT_VERSION%/bin/apache-tomcat-%TOMCAT_VERSION%.zip" "%TOMCAT_LOCALZIP%" | |
:SKIPTOMCATDOWNLOAD | |
cscript /NoLogo util\unzip.vbs %TOMCAT_LOCALZIP% %BASE% | |
REM | |
REM Copy app | |
REM | |
copy %WAR_NAME% "%CATALINA_HOME%\webapps\%WAR_NAME%" | |
REM | |
REM Launch tomcat | |
REM | |
cmd /c "%CATALINA_HOME%\bin\startup.bat" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment