Changeset 34

Show
Ignore:
Timestamp:
05/17/01 13:38:44 (11 years ago)
Author:
team4
Message:

*** empty log message ***

Location:
branches/refactoring_1/Rapla
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • branches/refactoring_1/Rapla/build.bat

    r26 r34  
    22rem ------------------------------------------------------------------------- 
    33rem rapla.bat Skript for Rapla 
    4 rem  
    5 rem This Script is taken form the apache-tomcat Project 
    64rem 
    7 rem Environment Variable Prerequisites: 
    8 rem 
    9 rem   RAPLA_HOME  (Optional) May point at your Rapla distribution 
    10 rem                directory.  If not present, the current working 
    11 rem                directory is assumed. 
    12 rem                Note: This batch file does not function properly 
    13 rem                if RAPLA_HOME contains spaces. 
    14 rem 
    15 rem   RAPLA_OPTS  (Optional) Java runtime options used when the "start", 
    16 rem                "stop", or "run" command is executed 
    17 rem 
    18 rem   CLASSPATH    (Optional) This batch file will automatically add 
    19 rem                what Rapla needs to the CLASSPATH.  This consists 
    20 rem                of RAPLA_HOME\classes and all the jar files in 
    21 rem                RAPLA_HOME\lib. This will include the "jaxp.jar" 
    22 rem                and "parser.jar" files from the JAXP Reference 
    23 rem                implementation, and the "tools.jar" from the JDK. 
    245rem 
    256rem   JAVA_HOME    Must point at your Java Development Kit installation. 
    267rem 
    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 --------------------- 
    358 
    369if not "%JAVA_HOME%" == "" goto gotJavaHome 
     
    3912:gotJavaHome 
    4013 
    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 
     14if not "%ANT_HOME%" == "" goto gotAntHome 
     15set ANT_HOME=. 
     16:gotAntHome 
    4917 
    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 
     18rem ----- Check for requiered jars -------------------------------------- 
     19if not exist "%JAVA_HOME%\lib\tools.jar" goto checkJarFiles 
     20if not exist "%ANT_HOME%\lib\ant.jar" goto checkJarFiles 
     21if not exist ".\lib\jaxp.jar" goto checkJarFiles 
     22if not exist ".\lib\crimson.jar" goto checkJarFiles 
    7423goto start 
    7524 
    76 :installClasspath 
    77 echo "%JAVA_HOME%\lib\tools.jar" not found 
     25:checkJarFiles 
     26echo Make sure the following files exist 
     27echo %JAVA_HOME%\lib\tools.jar 
     28echo .\lib\ant.jar 
     29echo .\lib\jaxp.jar  
     30echo .\lib\crimson.jar  
    7831goto cleanup 
    7932 
    8033: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  
    2727fi 
    2828 
     29CLASSPATH= 
    2930CLASSPATH=$CLASSPATH:$RAPLA_HOME/lib/ant.jar 
    3031CLASSPATH=$CLASSPATH:$RAPLA_HOME/lib/crimson.jar 
  • branches/refactoring_1/Rapla/build.xml

    r29 r34  
    33       <!-- set global properties for this build --> 
    44       <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 
    1213       <target name="prepare">  
    1314         <!-- Create the time stamp --> 
     
    1516         <!-- Create the build directory structure used by compile --> 
    1617         <mkdir dir="${build}" /> 
     18         <mkdir dir="${build}/classes" /> 
    1719       </target> 
    1820        
    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  
    2521       <target name="compile" depends="prepare"> 
    2622         <!-- 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>  
    3226         </javac> 
    3327       </target> 
     
    3529       <target name="build" depends="compile"> 
    3630         <!-- Copy the gifs into ${build} --> 
    37          <copy todir="${build}" > 
     31         <copy todir="${build}/classes" > 
    3832             <fileset dir="${src}" > 
    3933                <include name="**/*.gif" /> 
     
    4135         </copy>  
    4236         <!-- 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" /> 
    7838       </target> 
    7939 
    8040       <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> 
    8176       </target> 
    8277 
    8378       <target name="clean"> 
    84          <!-- Delete the ${build} and ${dist} directory trees --> 
     79         <!-- Delete the ${build} directory trees --> 
    8580         <delete dir="${build}" /> 
    86          <delete file="lib/Rapla.jar"/> 
    8781       </target> 
    88  
    8982</project> 
    9083