Changeset 34
- Timestamp:
- 05/17/01 13:38:44 (11 years ago)
- Location:
- branches/refactoring_1/Rapla
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/refactoring_1/Rapla/build.bat
r26 r34 2 2 rem ------------------------------------------------------------------------- 3 3 rem rapla.bat Skript for Rapla 4 rem5 rem This Script is taken form the apache-tomcat Project6 4 rem 7 rem Environment Variable Prerequisites:8 rem9 rem RAPLA_HOME (Optional) May point at your Rapla distribution10 rem directory. If not present, the current working11 rem directory is assumed.12 rem Note: This batch file does not function properly13 rem if RAPLA_HOME contains spaces.14 rem15 rem RAPLA_OPTS (Optional) Java runtime options used when the "start",16 rem "stop", or "run" command is executed17 rem18 rem CLASSPATH (Optional) This batch file will automatically add19 rem what Rapla needs to the CLASSPATH. This consists20 rem of RAPLA_HOME\classes and all the jar files in21 rem RAPLA_HOME\lib. This will include the "jaxp.jar"22 rem and "parser.jar" files from the JAXP Reference23 rem implementation, and the "tools.jar" from the JDK.24 5 rem 25 6 rem JAVA_HOME Must point at your Java Development Kit installation. 26 7 rem 27 28 29 rem ----- Save Environment Variables That May Change ------------------------30 31 set _RAPLA_HOME=%RAPLA_HOME%32 set _CLASSPATH=%CLASSPATH%33 34 rem ----- Verify and Set Required Environment Variables ---------------------35 8 36 9 if not "%JAVA_HOME%" == "" goto gotJavaHome … … 39 12 :gotJavaHome 40 13 41 if not "%RAPLA_HOME%" == "" goto gotRaplaHome 42 set RAPLA_HOME=. 43 echo RAPLA_HOME not set. Using %RAPLA_HOME% 44 :gotRaplaHome 45 if exist "%RAPLA_HOME%\lib\ant.jar" goto okRaplaHome 46 echo Unable to locate ant.jar, check the value of RAPLA_HOME. 47 goto cleanup 48 :okRaplaHome 14 if not "%ANT_HOME%" == "" goto gotAntHome 15 set ANT_HOME=. 16 :gotAntHome 49 17 50 rem ----- Prepare Appropriate Java Execution Commands ----------------------- 51 52 if not "%OS%" == "Windows_NT" goto noTitle 53 set _STARTJAVA=start "Rapla" "%JAVA_HOME%\bin\java" 54 set _RUNJAVA="%JAVA_HOME%\bin\java" 55 goto setClasspath 56 57 :noTitle 58 set _STARTJAVA=start "%JAVA_HOME%\bin\java" 59 set _RUNJAVA="%JAVA_HOME%\bin\java" 60 61 62 rem ----- Set Up The Runtime Classpath -------------------------------------- 63 64 :setClasspath 65 echo Setting your CLASSPATH statically. 66 if exist "%RAPLA_HOME%\lib\ant.jar" set CLASSPATH=%CLASSPATH%;%RAPLA_HOME%\lib\ant.jar 67 if exist "%RAPLA_HOME%\lib\jaxp.jar" set CLASSPATH=%CLASSPATH%;%RAPLA_HOME%\lib\jaxp.jar 68 if exist "%RAPLA_HOME%\lib\crimson.jar" set CLASSPATH=%CLASSPATH%;%RAPLA_HOME%\lib\crimson.jar 69 70 71 :chkClasspath 72 if not exist "%JAVA_HOME%\lib\tools.jar" goto installClasspath 73 set CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar 18 rem ----- Check for requiered jars -------------------------------------- 19 if not exist "%JAVA_HOME%\lib\tools.jar" goto checkJarFiles 20 if not exist "%ANT_HOME%\lib\ant.jar" goto checkJarFiles 21 if not exist ".\lib\jaxp.jar" goto checkJarFiles 22 if not exist ".\lib\crimson.jar" goto checkJarFiles 74 23 goto start 75 24 76 :installClasspath 77 echo "%JAVA_HOME%\lib\tools.jar" not found 25 :checkJarFiles 26 echo Make sure the following files exist 27 echo %JAVA_HOME%\lib\tools.jar 28 echo .\lib\ant.jar 29 echo .\lib\jaxp.jar 30 echo .\lib\crimson.jar 78 31 goto cleanup 79 32 80 33 :start 81 echo. 82 echo Using CLASSPATH: %CLASSPATH% 83 echo. 84 85 86 rem ----- Execute The Requested Command ------------------------------------- 87 88 if "%1" == "run" goto run 89 if "%1" == "start" goto start 90 if "%1" == "" goto runAnt 91 if "%1" == "ant" goto runAnt 92 if "%1" == "direct" goto runDirect 93 94 :doUsage 95 echo Usage: rapla ( ant ^| env ^| ^| run ^| start ^| stop ) 96 echo Commands: 97 echo ant - Run Ant in Rapla's environment 98 echo run - Start Rapla in the current window 99 echo start - Start Rapla in a separate window 100 echo direct - * Achtung nur aufrufen, falls die anderen nicht funktionieren" 101 goto cleanup 102 103 :doEnv 104 goto finish 105 106 :start 107 echo Starting Rapla in new window 108 %_STARTJAVA% %RAPLA_OPTS% -Ddb=%RAPLA_DB% -Drapla.home="%RAPLA_HOME%" org.apache.tools.ant.Main -buildfile %RAPLA_HOME%\build.xml run %2 %3 %4 %5 %6 %7 %8 %9 109 goto cleanup 110 111 :run 112 %_RUNJAVA% %RAPLA_OPTS% -Ddb=%RAPLA_DB% -Drapla.home="%RAPLA_HOME%" org.apache.tools.ant.Main -buildfile %RAPLA_HOME%\build.xml run %2 %3 %4 %5 %6 %7 %8 %9 113 goto cleanup 114 115 :runAnt 116 rem Run ANT in Rapla's Environment 117 %_RUNJAVA% %RAPLA_OPTS% -Drapla.home="%RAPLA_HOME%" org.apache.tools.ant.Main -buildfile %RAPLA_HOME%\build.xml %2 %3 %4 %5 %6 %7 %8 %9 118 goto cleanup 119 120 121 :cleanup 122 set _LIBJARS= 123 set _STARTJAVA= 124 set _RUNJAVA= 125 set CLASSPATH=%_CLASSPATH% 126 set _CLASSPATH= 127 set RAPLA_DB=%_RAPLA_DB% 128 set _RAPLA_DB= 129 set RAPLA_HOME=%_RAPLA_HOME% 130 set _RAPLA_HOME= 131 :finish 132 133 134 135 136 137 138 139 140 34 %JAVA_HOME%\bin\java %ANT_OPTS% -classpath %JAVA_HOME%\lib.jar;%ANT_HOME%\lib\ant.jar;.\lib\jaxp.jar;.\lib\crimson.jar -Dant.home=%ANT_HOME% -Drapla.home="%RAPLA_HOME%" org.apache.tools.ant.Main -buildfile %RAPLA_HOME%\build.xml %1 %2 %3 %4 %5 %6 %7 %8 %9 -
branches/refactoring_1/Rapla/build.sh
r26 r34 27 27 fi 28 28 29 CLASSPATH= 29 30 CLASSPATH=$CLASSPATH:$RAPLA_HOME/lib/ant.jar 30 31 CLASSPATH=$CLASSPATH:$RAPLA_HOME/lib/crimson.jar -
branches/refactoring_1/Rapla/build.xml
r29 r34 3 3 <!-- set global properties for this build --> 4 4 <property name="src" value="src" /> 5 <property name="build" value="classes" /> 6 <property name="run" value="org.rapla.gui.Start" /> 7 <property name="db_driver" value="lib/mm.mysql-2.0.2-bin.jar"/> 8 <property name="xml_parser_lib1" value="lib/crimson.jar"/> 9 <property name="xml_parser_lib2" value="lib/jaxp.jar"/> 10 <property name="rapla.home" /> 11 <property name="config_path" value="rapla.properties" /> 5 <property name="build" value="build" /> 6 <property name="dist" value="dist" /> 7 <path id="classpath"> 8 <fileset dir="./lib"> 9 <include name="*.jar"/> 10 </fileset> 11 </path> 12 12 13 <target name="prepare"> 13 14 <!-- Create the time stamp --> … … 15 16 <!-- Create the build directory structure used by compile --> 16 17 <mkdir dir="${build}" /> 18 <mkdir dir="${build}/classes" /> 17 19 </target> 18 20 19 <target name="build_db" depends="prepare">20 <!-- Put everything in ${build_db} into the db.jar file -->21 <jar jarfile="lib/db.jar" basedir="${build_db}" />22 </target>23 24 25 21 <target name="compile" depends="prepare"> 26 22 <!-- Compile the java code from ${src} into ${build} --> 27 28 <javac srcdir="${src}" destdir="${build}" verbose="no"> 29 <classpath> 30 <!--pathelement path="lib/db.jar" /--> 31 </classpath> 23 <javac srcdir="${src}" destdir="${build}/classes" verbose="no"> 24 <classpath refid="classpath"> 25 </classpath> 32 26 </javac> 33 27 </target> … … 35 29 <target name="build" depends="compile"> 36 30 <!-- Copy the gifs into ${build} --> 37 <copy todir="${build} " >31 <copy todir="${build}/classes" > 38 32 <fileset dir="${src}" > 39 33 <include name="**/*.gif" /> … … 41 35 </copy> 42 36 <!-- Put everything in ${build} into the Rapla.jar file --> 43 <jar jarfile="lib/Rapla.jar" basedir="${build}" /> 44 </target> 45 46 <target name="run" depends="build"> 47 <antcall target="run_with_config"/> 48 <!-- antcall target="run_without_config" /--> 49 </target> 50 51 <target name="run_with_config" if="config_path"> 52 <echo message="Using Class : ${run}"/> 53 <echo message="With Config: ${config_path}"/> 54 <java classname="${run}" fork="yes"> 55 <!--jvmarg value="-Dorg.xml.sax.driver=org.apache.crimson.parsers.Parser2"/--> 56 <!--jvmarg value="-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser"/--> 57 <classpath> 58 <pathelement path="classes" /> 59 <pathelement path="${db_driver}" /> 60 <pathelement path="${xml_parser_lib1}" /> 61 <pathelement path="${xml_parser_lib2}" /> 62 </classpath> 63 <arg value="${config_path}"/> 64 </java> 65 </target> 66 67 <target name="run_without_config" unless="config_path"> 68 <echo message="Using Class : ${run}"/> 69 <echo message="Without Config"/> 70 <java classname="${run}" fork="yes"> 71 <classpath> 72 <pathelement path="classes" /> 73 <pathelement path="${db_driver}" /> 74 <pathelement path="${xml_parser_lib1}" /> 75 <pathelement path="${xml_parser_lib2}" /> 76 </classpath> 77 </java> 37 <jar jarfile="${build}/rapla.jar" basedir="${build}/classes" /> 78 38 </target> 79 39 80 40 <target name="dist" depends="build"> 41 <mkdir dir="${dist}" /> 42 <mkdir dir="${dist}/lib" /> 43 <copy todir="${dist}/lib" > 44 <fileset dir="lib" > 45 <include name="crimson.jar" /> 46 <include name="jaxp.jar" /> 47 <include name="mm.mysql-2.0.2-bin.jar" /> 48 </fileset> 49 <fileset dir="build" > 50 <include name="rapla.jar" /> 51 </fileset> 52 </copy> 53 <mkdir dir="${dist}/html" /> 54 <copy todir="${dist}" > 55 <fileset dir="html" > 56 <include name="**" /> 57 </fileset> 58 </copy> 59 <copy todir="${dist}" > 60 <fileset dir="." > 61 <include name="README" /> 62 <include name="INSTALL" /> 63 <include name="dummydb.sql" /> 64 <include name="rapladb.sql" /> 65 <include name="rapla.properties" /> 66 <include name="data.xml" /> 67 <include name="start.sh" /> 68 <include name="start.bat" /> 69 </fileset> 70 </copy> 71 <chmod perm="ugo+rx"> 72 <fileset dir="${dist}"> 73 <include name="start.*"/> 74 </fileset> 75 </chmod> 81 76 </target> 82 77 83 78 <target name="clean"> 84 <!-- Delete the ${build} and ${dist}directory trees -->79 <!-- Delete the ${build} directory trees --> 85 80 <delete dir="${build}" /> 86 <delete file="lib/Rapla.jar"/>87 81 </target> 88 89 82 </project> 90 83
![(please configure the [header_logo] section in trac.ini)](/chrome/site/rapla.jpg)