Changeset 113

Show
Ignore:
Timestamp:
02/22/07 11:48:01 (6 years ago)
Author:
tobi
Message:
  • Rewrote build scripts to work with arbitrary ant installations (tested with version 1.7) making ant-related JAR files in the distribution obsolete
  • Removed obsolete JAR files
Location:
jala/trunk/util/HopKit
Files:
5 removed
3 modified

Legend:

Unmodified
Added
Removed
  • jala/trunk/util/HopKit/build.bat

    r79 r113  
    2525@echo off 
    2626 
    27 REM -------------------------------------------- 
    28 REM buildfile for ant 1.6.5 
    29 REM -------------------------------------------- 
     27rem This is build.bat for Ant 1.7 
    3028 
    31 rem set JAVA_HOME=c:\programme\Java\jre1.5.0_05 
     29rem Define the path to the ANT binary directory 
     30rem (traling slash is mandatory!) 
     31rem set ANT_HOME=%PROGRAMFILES%\Apache Group\apache-ant-1.7.0\bin\ 
    3232 
    33 REM -------------------------------------------- 
    34 REM No need to edit anything past here 
    35 REM -------------------------------------------- 
     33rem ========================================================================== 
     34rem No need to edit anything past here 
    3635 
    37  
    38 rem ---- store path of this script as BUILD_HOME 
     36rem store path of this script as BUILD_HOME 
    3937set BUILD_HOME=%~dp0 
    4038 
    41 rem ---- Slurp the command line arguments. This loop allows for an unlimited number 
    42 rem ---- of arguments (up to the command line limit, anyway). 
     39rem Slurp the command line arguments. This loop allows for an unlimited number 
     40rem of arguments (up to the command line limit, anyway). 
    4341set ANT_CMD_LINE_ARGS=%1 
    44 if ""%1""=="""" goto final 
     42if ""%1""=="""" goto runAnt 
    4543shift 
    4644:setupArgs 
    47 if ""%1""=="""" goto final 
    48 if ""%1""==""-noclasspath"" goto final 
     45if ""%1""=="""" goto runAnt 
     46if ""%1""==""-noclasspath"" goto runAnt 
    4947set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1 
    5048shift 
    5149goto setupArgs 
    5250 
    53  
    54 :final 
    55  
     51:runAnt 
    5652 
    5753rem ---- if there is no build.xml in the working directory, use the library 
     
    6157) 
    6258 
    63 echo buildhome: %BUILD_HOME% 
    64 if "%JAVA_HOME%" == "" goto javahomeerror 
     59echo BUILD_HOME: %BUILD_HOME% 
    6560 
    66 set CP=%CLASSPATH%;%BUILD_HOME%lib/ant-launcher.jar 
    67  
    68 echo CLASSPATH: "%CP%" 
    69 echo JAVA_HOME: "%JAVA_HOME%" 
    70  
    71 "%JAVA_HOME%\bin\java.exe" -classpath "%CP%" %APPNAME% "-Dant.home=." "-Dbasedir=." org.apache.tools.ant.launch.Launcher -propertyfile "%CD%\build.properties" %ANT_CMD_LINE_ARGS% 
    72  
    73 goto end 
    74  
    75  
    76 REM -----------ERROR------------- 
    77 :javahomeerror 
    78 echo "ERROR: JAVA_HOME not found in your environment." 
    79 echo "Please, set the JAVA_HOME variable in your environment to match the" 
    80 echo "location of the Java Virtual Machine you want to use." 
     61ant -Dant.home=. -Dbasedir=. -lib "%BUILD_HOME%\lib" -propertyfile "%CD%\build.properties" %ANT_CMD_LINE_ARGS% 
    8162 
    8263:end 
    83  
  • jala/trunk/util/HopKit/build.sh

    r79 r113  
    2525 
    2626#-------------------------------------------- 
    27 # buildfile for ant 1.6.5 
     27# buildfile for ant 1.7.0 
    2828#-------------------------------------------- 
    29 if test -z "${JAVA_HOME}" ; then 
    30     echo "ERROR: JAVA_HOME not found in your environment." 
    31     echo "Please, set the JAVA_HOME variable in your environment to match the" 
    32     echo "location of the Java Virtual Machine you want to use." 
     29if test -z "${ANT_HOME}" ; then 
     30    echo "ERROR: ANT_HOME not found in your environment." 
     31    echo "Please, set the ANT_HOME variable in your environment to match the" 
     32    echo "location of the Apache Ant installation you want to use." 
    3333    exit 
    3434fi 
     
    5757fi 
    5858 
    59 CP="${CLASSPATH}:${BUILD_HOME}/lib/ant-launcher.jar" 
    60  
    61 "${JAVA_HOME}/bin/java" -classpath "${CP}" -Dant.home="${BUILD_HOME}" -Dbasedir="${PWD}" org.apache.tools.ant.launch.Launcher -propertyfile "${PWD}/build.properties" -file "${BUILD_XML}" ${ANT_CMD_LINE_ARGS} 
     59"${ANT_HOME}/bin/ant -Dant.home="${BUILD_HOME}" -Dbasedir="${PWD}" -lib "${BUILD_HOME}/lib" -propertyfile "${PWD}\build.properties" ${ANT_CMD_LINE_ARGS} 
    6260 
    6361exit 
  • jala/trunk/util/HopKit/lib.xml

    r79 r113  
    22 
    33<project name="jala-utils" default="usage"> 
    4  
    5    <taskdef resource="net/sf/antcontrib/antlib.xml"/> 
    64 
    75   <property environment="env"/> 
     
    1917   <target name="usage"> 
    2018      <echo message="" /> 
    21       <echo message=" available targets are:" /> 
    22       <echo message=" jslint   -> run jslint on the current directory (validation)" /> 
    23       <echo message=" docs       -> run jsdoc on a helma application" /> 
    24       <echo message=" pot      -> parse i18n methods out of function files and skins and" /> 
    25       <echo message="             creates a gettext template file." /> 
    26       <echo message=" messages -> compile gnu gettext .po files into javascript message files" /> 
     19      <echo message=" Available targets are:" /> 
     20      <echo message=" jslint   -> Run jslint on the current directory (validation)" /> 
     21      <echo message=" docs     -> Run jsdoc on a helma application" /> 
     22      <echo message=" pot      -> Parse i18n methods out of function files and skins and" /> 
     23      <echo message="             create a gettext template file." /> 
     24      <echo message=" messages -> Compile Gnu PO-files into JavaScript message files" /> 
    2725      <echo message="" /> 
    28       <echo message=" macro definitions that can be used in other build files:" /> 
     26      <echo message=" Macro definitions that can be used in other build files:" /> 
    2927      <echo message=" - jslint" /> 
    3028      <echo message=" - jsdoc" /> 
    3129      <echo message=" - jsmin" /> 
    3230      <echo message="" /> 
    33       <echo message=" See comments inside the build.xml file for more details." /> 
    34       <echo message="---------------------------------------------------------------" /> 
     31      <echo message=" See comments inside this file (lib.xml) for more details." /> 
     32      <echo message="----------------------------------------------------------" /> 
    3533      <echo message="" /> 
    3634      <echo message="" /> 
     
    5351   <!-- =================================================================== --> 
    5452   <target name="jsdoc"> 
    55       <echo message="Creating javascript docs with jsdoc on ${user.dir}" /> 
     53      <echo message="Creating JavaScript docs with JSDoc on ${user.dir}" /> 
    5654      <property name="jsdoc.projectName" value="" /> 
    5755      <input message="Destination directory (docs):" 
     
    9189   <!-- =================================================================== --> 
    9290   <target name="pot"> 
    93       <input message="Template file to generate (messages.pot):" 
     91      <input message="Name of the template file to generate:" 
    9492             addproperty="i18n.template" defaultvalue="messages.pot" /> 
    9593      <echo message="Using '${i18n.template}' as output" /> 
    96       <input message="Directories containing code/skins (separate with spaces):" 
     94      <input message="Directories containing code/skins separated by spaces:" 
    9795             addproperty="i18n.scan" /> 
    9896        <!-- convert inputs to absolute paths --> 
     
    112110   <!-- =================================================================== --> 
    113111   <target name="messages"> 
    114       <input message="Directory containing .po files:" 
     112      <input message="Directory containing PO-files:" 
    115113             addproperty="i18n.poDirectory" /> 
    116114      <input message="Destination directory for generated message files:" 
     
    121119        <property name="src" location="${i18n.poDirectory}" /> 
    122120        <property name="dest" location="${i18n.destination}" /> 
    123       <echo message="Generating message files from .po files in '${src}'..." /> 
     121      <echo message="Generating message files from PO-files in '${src}'..." /> 
    124122      <echo message="Using '${dest}' as output directory" /> 
    125123      <java classname="org.mozilla.javascript.tools.shell.Main"> 
     
    169167        <attribute name="projectName" /> 
    170168      <sequential> 
    171          <echo message="Generating API docs for Helma application in @{srcdir}" /> 
     169         <echo message="Generating API specification for Helma application in @{srcdir}" /> 
    172170         <property name="workHelmadoc" value="${work}/helmadocs-worker" /> 
    173171         <mkdir dir="${workHelmadoc}" />