Author: rmannibucau
Date: Sun Dec 16 17:33:26 2012
New Revision: 1422636
URL: http://svn.apache.org/viewvc?rev=1422636&view=rev
Log:
TOMEE-660 basic tomee.bat file
Added:
openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.bat
Modified:
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-webprofile.xml
Modified:
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-webprofile.xml
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-webprofile.xml?rev=1422636&r1=1422635&r2=1422636&view=diff
==============================================================================
---
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-webprofile.xml
(original)
+++
openejb/trunk/openejb/tomee/apache-tomee/src/main/assembly/tomee-webprofile.xml
Sun Dec 16 17:33:26 2012
@@ -60,6 +60,7 @@
<includes>
<include>service.*</include>
<include>TomEE.*</include>
+ <include>*.bat</include>
</includes>
</fileSet>
<fileSet>
Added: openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.bat
URL:
http://svn.apache.org/viewvc/openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.bat?rev=1422636&view=auto
==============================================================================
--- openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.bat
(added)
+++ openejb/trunk/openejb/tomee/apache-tomee/src/main/resources/tomee.bat Sun
Dec 16 17:33:26 2012
@@ -0,0 +1,85 @@
+@echo off
+rem Licensed to the Apache Software Foundation (ASF) under one or more
+rem contributor license agreements. See the NOTICE file distributed with
+rem this work for additional information regarding copyright ownership.
+rem The ASF licenses this file to You under the Apache License, Version 2.0
+rem (the "License"); you may not use this file except in compliance with
+rem the License. You may obtain a copy of the License at
+rem
+rem http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+if "%OS%" == "Windows_NT" setlocal
+
+set port=8080
+
+rem Guess CATALINA_HOME if not defined
+set "CURRENT_DIR=%cd%"
+if not "%CATALINA_HOME%" == "" goto gotHome
+set "CATALINA_HOME=%CURRENT_DIR%"
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+cd ..
+set "CATALINA_HOME=%cd%"
+cd "%CURRENT_DIR%"
+:gotHome
+
+if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
+echo The CATALINA_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+:okHome
+
+rem Copy CATALINA_BASE from CATALINA_HOME if not defined
+if not "%CATALINA_BASE%" == "" goto gotBase
+set "CATALINA_BASE=%CATALINA_HOME%"
+:gotBase
+
+rem Ensure that any user defined CLASSPATH variables are not used on startup,
+rem but allow them to be specified in setenv.bat, in rare case when it is
needed.
+set CLASSPATH=
+
+rem Get standard Java environment variables
+if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
+echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat"
+echo This file is needed to run this program
+goto end
+:okSetclasspath
+call "%CATALINA_HOME%\bin\setclasspath.bat" %1
+if errorlevel 1 goto end
+
+
+if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
+set "CATALINA_TMPDIR=%CATALINA_BASE%\temp"
+:gotTmpdir
+
+
+rem create classpath
+setlocal enabledelayedexpansion
+
+set cp="%CATALINA_HOME%\bin\tomcat-juli.jar"
+set lib="%CATALINA_HOME%\lib\"
+echo %lib%
+for %%F in (%lib%/*.jar) do (
+ set cp=!cp!;%%F%
+)
+
+if ""%1"" == ""deploy"" goto doDeploy
+if ""%1"" == ""undeploy"" goto doUndeploy
+goto doExec
+
+:doDeploy
+:doUndeploy
+%_RUNJAVA% -cp "%cp%" -Djava.io.tmpdir="%CATALINA_TMPDIR%"
org.apache.openejb.cli.Bootstrap %1 -s http://localhost:%port%/tomee/ejb %2
+goto end
+
+:doExec
+%_RUNJAVA% -cp "%cp%" -Djava.io.tmpdir="%CATALINA_TMPDIR%"
org.apache.openejb.cli.Bootstrap %*
+goto end
+
+:end
+