ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/src/script ant ant.bat antRun antRun.bat lcp.bat runant.pl
Date Tue, 23 Jan 2001 05:10:39 GMT
donaldp     01/01/22 21:10:39

  Modified:    .        .cvsignore bootstrap.bat bootstrap.sh build.bat
                        build.sh build.xml
  Added:       lib      jaxp.jar parser.jar
               lib/optional README
               src/script ant ant.bat antRun antRun.bat lcp.bat runant.pl
  Removed:     lib      README
               lib/core jaxp.jar junit.jar parser.jar
               src/bin  ant ant.bat antRun antRun.bat lcp.bat runant.pl
  Log:
  Checked in alpha version of new build system.
  
  May not fully build on *nix platforms yet.
  
  Revision  Changes    Path
  1.4       +2 -1      jakarta-ant/.cvsignore
  
  Index: .cvsignore
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/.cvsignore,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- .cvsignore	2000/11/26 01:53:47	1.3
  +++ .cvsignore	2001/01/23 05:10:32	1.4
  @@ -1,5 +1,6 @@
   .ant.properties
  -bin
  +dist
  +build
   prj.el
   emacs-jprj.el
   bootstrap.bat.pif
  
  
  
  1.24      +15 -23    jakarta-ant/bootstrap.bat
  
  Index: bootstrap.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/bootstrap.bat,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- bootstrap.bat	2001/01/21 01:48:23	1.23
  +++ bootstrap.bat	2001/01/23 05:10:32	1.24
  @@ -18,33 +18,29 @@
   echo.
   echo ... Bootstrapping Ant Distribution
   
  -if exist lib\ant.jar erase lib\ant.jar
  +SET CLASSDIR=build\classes
  +SET LOCALCLASSPATH=lib\parser.jar;lib\jaxp.jar
   
  -SET LOCALCLASSPATH=
  -for %%i in (lib\core\*.jar) do call src\bin\lcp.bat %%i
  +if exist %JAVA_HOME%\lib\tools.jar call src\script\lcp.bat %JAVA_HOME%\lib\tools.jar
  +if exist %JAVA_HOME%\lib\classes.zip call src\script\lcp.bat %JAVA_HOME%\lib\classes.zip
   
  -if exist %JAVA_HOME%\lib\tools.jar call src\bin\lcp.bat %JAVA_HOME%\lib\tools.jar
  -if exist %JAVA_HOME%\lib\classes.zip call src\bin\lcp.bat %JAVA_HOME%\lib\classes.zip
  -
  -set TOOLS=src\main\org\apache\tools
  -set CLASSDIR=classes
  -
  -SET CLASSPATH=%LOCALCLASSPATH%;%CLASSDIR%;src\main;%CLASSPATH%
  -
   echo JAVA_HOME=%JAVA_HOME%
   echo JAVA=%JAVA%
   echo JAVAC=%JAVAC%
  -echo CLASSPATH=%CLASSPATH%
  +echo CLASSPATH=%LOCALCLASSPATH%
   
  -if     "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
  -if not "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul deltree/y %CLASSDIR%
  +if     "%OS%" == "Windows_NT" if exist build rmdir/s/q build
  +if not "%OS%" == "Windows_NT" deltree/y build
   
  -mkdir %CLASSDIR%
  +mkdir build
  +mkdir build\classes
   
   echo.
   echo ... Compiling Ant Classes
  +
  +SET TOOLS=src\main\org\apache\tools
   
  -%JAVAC% -d %CLASSDIR% %TOOLS%\tar\*.java %TOOLS%\ant\*.java %TOOLS%\ant\types\*.java %TOOLS%\ant\taskdefs\*.java %TOOLS%\ant\util\*.java %TOOLS%\ant\util\regexp\RegexpMatcher.java %TOOLS%\ant\util\regexp\RegexpMatcherFactory.java
  +%JAVAC% -classpath %LOCALCLASSPATH%;src\main -d build\classes %TOOLS%\tar\*.java %TOOLS%\ant\*.java %TOOLS%\ant\types\*.java %TOOLS%\ant\taskdefs\*.java %TOOLS%\ant\util\*.java %TOOLS%\ant\util\regexp\RegexpMatcher.java %TOOLS%\ant\util\regexp\RegexpMatcherFactory.java
   
   echo.
   echo ... Copying Required Files
  @@ -54,14 +50,9 @@
   
   echo.
   echo ... Building Ant Distribution
  -
  -%JAVA% %ANT_OPTS% org.apache.tools.ant.Main clean main bootstrap %1 %2 %3 %4 %5
  -
  -echo.
  -echo ... Cleaning Up Build Directories
   
  -if     "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
  -if not "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul deltree/y %CLASSDIR%
  +SET CLASSPATH=%LOCALCLASSPATH%;build\classes
  +call build.bat
   
   echo.
   echo ... Done Bootstrapping Ant Distribution
  @@ -73,6 +64,7 @@
   set OLDJAVA=
   set OLDJAVAC=
   set OLDCLASSPATH=
  +set CLASSPATH=
   set LOCALCLASSPATH=
   set OLDANTHOME=
   set TOOLS=
  
  
  
  1.34      +41 -57    jakarta-ant/bootstrap.sh
  
  Index: bootstrap.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/bootstrap.sh,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- bootstrap.sh	2001/01/16 16:34:56	1.33
  +++ bootstrap.sh	2001/01/23 05:10:32	1.34
  @@ -1,17 +1,35 @@
   #!/bin/sh
   
  -# You will need to specify JAVA_HOME if compiling with 1.2 or later.
  +# Cygwin support.  $cygwin _must_ be set to either true or false.
  +case "`uname`" in
  +  CYGWIN*) cygwin=true ;;
  +  *) cygwin=false ;;
  +esac
  +
  +# For Cygwin, ensure paths are in UNIX format before anything is touched
  +if $cygwin; then
  +  [ -n "$JAVA_HOME" ] &&
  +    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  +  [ -n "$CLASSPATH" ] &&
  +    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  +fi
  +
  +LOCALCLASSPATH=lib/parser.jar:lib/jaxp.jar
   
  +if [ "$CLASSPATH" != "" ] ; then
  +  LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
  +fi
  +
   if [ "$JAVA_HOME" != "" ] ; then
  -  if [ -f $JAVA_HOME/lib/tools.jar ] ; then
  -    CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
  +  if test -f $JAVA_HOME/lib/tools.jar ; then
  +    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
     fi
  - 
  -  if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
  -    CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip
  +
  +  if test -f $JAVA_HOME/lib/classes.zip ; then
  +    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
     fi
   else
  -  echo "Warning: JAVA_HOME environment variable not set."
  +  echo "Warning: JAVA_HOME environment variable is not set."
     echo "  If build fails because sun.* classes could not be found"
     echo "  you will need to set the JAVA_HOME environment variable"
     echo "  to the installation directory of java."
  @@ -23,63 +41,29 @@
     exit
   fi
   
  -# More Cygwin support
  -if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
  -  CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  -fi
  -
  -ANT_HOME=.
  -export ANT_HOME
  -
   if [ -z "$JAVAC" ] ; then
     JAVAC=${JAVA_HOME}/bin/javac;
   fi
   
   echo ... Bootstrapping Ant Distribution
  -
  -if [ -f "lib/ant.jar" ] ; then
  -  rm lib/ant.jar
  -fi
  -if [ -f "lib/optional.jar" ] ; then
  -  rm lib/optional.jar
  -fi
   
  -# add in the dependency .jar files
  -DIRLIBS=${ANT_HOME}/lib/*.jar
  -for i in ${DIRLIBS}
  -do
  -    # if the directory is empty, then it will return the input string
  -    # this is stupid, so case for it
  -    if [ "$i" != "${DIRLIBS}" ] ; then
  -        CLASSPATH=$CLASSPATH:"$i"
  -    fi
  -done
  -DIRCORELIBS=${ANT_HOME}/lib/core/*.jar
  -for i in ${DIRCORELIBS}
  -do
  -    # if the directory is empty, then it will return the input string
  -    # this is stupid, so case for it
  -    if [ "$i" != "${DIRCORELIBS}" ] ; then
  -        CLASSPATH=$CLASSPATH:"$i"
  -    fi
  -done
  +rm -rf build
   
   TOOLS=src/main/org/apache/tools
  -CLASSDIR=classes
  -
  -CLASSPATH=${CLASSDIR}:src/main:${CLASSPATH}
  -
  -# convert the unix path to windows
  -if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
  -   CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  -fi
  -
  -export CLASSPATH
  +CLASSDIR=build\classes
   
  +mkdir -p build
   mkdir -p ${CLASSDIR}
   
   echo ... Compiling Ant Classes
   
  +export CLASSPATH=$LOCALCLASSPATH:src/main
  +
  +# For Cygwin, switch paths to Windows format before running javac
  +if $cygwin; then
  +  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  +fi
  +
   ${JAVAC} -d ${CLASSDIR} ${TOOLS}/tar/*.java \
       ${TOOLS}/ant/util/regexp/RegexpMatcher.java \
       ${TOOLS}/ant/util/regexp/RegexpMatcherFactory.java \
  @@ -95,13 +79,13 @@
   
   echo ... Building Ant Distribution
   
  -${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main \
  -                      -buildfile build.xml clean main bootstrap
  +export CLASSPATH=$LOCALCLASSPATH:build/classes
   
  -echo ... Cleaning Up Build Directories
  -
  -chmod +x bin/ant bin/antRun
  +# For Cygwin, switch paths to Windows format before running javac
  +if $cygwin; then
  +  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
  +fi
   
  -rm -rf ${CLASSDIR}
  +${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main
   
   echo ... Done Bootstrapping Ant Distribution
  
  
  
  1.15      +36 -14    jakarta-ant/build.bat
  
  Index: build.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.bat,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- build.bat	2001/01/21 01:48:23	1.14
  +++ build.bat	2001/01/23 05:10:32	1.15
  @@ -1,19 +1,41 @@
   @echo off
   
  -set REALANTHOME=%ANT_HOME%
  +if exist build\classes\org\apache\tools\ant\Main.class goto doBuild
  +
  +bootstrap.bat
  +
  +:doBuild
  +
  +echo ----------------
  +echo Ant Build System
  +echo ----------------
  +
  +rem exit
  +
  +set LOCALCLASSPATH=build\classes
  +for %%i in (lib\*.jar) do call src\script\lcp.bat %%i
  +
   set ANT_HOME=.
  -if exist lib\ant.jar if exist bin\ant.bat if exist bin\lcp.bat if exist bin\antRun.bat goto runAnt
  -call bootstrap.bat
   
  +if "%JAVA_HOME%" == "" goto noJavaHome
  +if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java
  +if exist "%JAVA_HOME%\lib\tools.jar" call src\script\lcp.bat "%JAVA_HOME%\lib\tools.jar"
  +if exist "%JAVA_HOME%\lib\classes.zip" call src\script\lcp.bat" "%JAVA_HOME%\lib\classes.zip"
  +goto runAnt
  +
  +:noJavaHome
  +if "%_JAVACMD%" == "" set _JAVACMD=java
  +echo.
  +echo Warning: JAVA_HOME environment variable is not set.
  +echo   If build fails because sun.* classes could not be found
  +echo   you will need to set the JAVA_HOME environment variable
  +echo   to the installation directory of java.
  +echo.
  +
   :runAnt
  -if not "%REALANTHOME%" == "" goto install_ant
  -call .\bin\ant.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
  -goto cleanup
  -
  -:install_ant
  -call .\bin\ant.bat -Dant.install="%REALANTHOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9
  -
  -rem clean up
  -:cleanup
  -set ANT_HOME=%REALANTHOME%
  -set REALANTHOME=
  +set CLASSPATH=%LOCALCLASSPATH%
  +set LOCALCLASSPATH=
  +%_JAVACMD% -classpath %CLASSPATH% %ANT_OPTS% org.apache.tools.ant.Main -logger org.apache.tools.ant.NoBannerLogger -emacs %1 %2 %3 %4 %5 %6 %7 %8
  +
  +set ANT_HOME=
  +set CLASSPATH=
  
  
  
  1.12      +48 -8     jakarta-ant/build.sh
  
  Index: build.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.sh,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- build.sh	2000/07/17 10:12:00	1.11
  +++ build.sh	2001/01/23 05:10:32	1.12
  @@ -1,16 +1,56 @@
   #!/bin/sh
   
  -REALANTHOME=$ANT_HOME
  -ANT_HOME=.
  -export ANT_HOME
  -
  -if test ! -f lib/ant.jar -o  ! -x bin/ant -o ! -x bin/antRun ; then
  +if test ! -f build\classes\org\apache\tools\ant\Main.class ; then
     ./bootstrap.sh
   fi    
  +
  +
  +# Cygwin support.  $cygwin _must_ be set to either true or false.
  +case "`uname`" in
  +  CYGWIN*) cygwin=true ;;
  +  *) cygwin=false ;;
  +esac
  +
  +# For Cygwin, ensure paths are in UNIX format before anything is touched
  +if $cygwin; then
  +  [ -n "$JAVA_HOME" ] &&
  +    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
  +  [ -n "$CLASSPATH" ] &&
  +    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  +fi
  +
  +LOCALCLASSPATH=`echo lib/*.jar | tr ' ' ':'`
  +
  +if [ "$CLASSPATH" != "" ] ; then
  +  LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
  +fi
  +
  +if [ "$JAVA_HOME" != "" ] ; then
  +  if test -f $JAVA_HOME/lib/tools.jar ; then
  +    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
  +  fi
  +
  +  if test -f $JAVA_HOME/lib/classes.zip ; then
  +    LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
  +  fi
  +else
  +  echo "Warning: JAVA_HOME environment variable is not set."
  +  echo "  If build fails because sun.* classes could not be found"
  +  echo "  you will need to set the JAVA_HOME environment variable"
  +  echo "  to the installation directory of java."
  +fi
   
  -if [ "$REALANTHOME" != "" ] ; then
  -  ANT_INSTALL="-Dant.install $REALANTHOME"
  +if [ ! -x "$JAVA_HOME/bin/java" ] ; then
  +  echo "Error: JAVA_HOME is not defined correctly."
  +  echo "  We cannot execute JAVA_HOME/bin/java"
  +  exit
   fi
  +
  +# For Cygwin, switch paths to Windows format before running javac
  +if $cygwin; then
  +  LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
  +fi
  +
  +${JAVA_HOME}/bin/java -classpath $LOCALCLASSPATH org.apache.tools.ant.Main -logger org.apache.tools.ant.NoBannerLogger -emacs $*
   
  -bin/ant $ANT_INSTALL $*
   
  
  
  
  1.109     +338 -476  jakarta-ant/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/build.xml,v
  retrieving revision 1.108
  retrieving revision 1.109
  diff -u -r1.108 -r1.109
  --- build.xml	2001/01/03 20:37:07	1.108
  +++ build.xml	2001/01/23 05:10:33	1.109
  @@ -1,60 +1,100 @@
   <?xml version="1.0"?>
   
  -<!-- ======================================================================= -->
  -<!-- Ant own build file                                                      -->
  -<!-- ======================================================================= -->
  -
  +<!-- 
  +  =======================================================================
  +  Ant own build file                                                      
  +  ======================================================================= 
  +-->
   <project name="Ant" default="main" basedir=".">
   
     <!-- Give user a chance to override without editing this file 
          (and without typing -D each time it compiles it) -->
  -  <property file="${user.home}/.ant.properties" />
     <property file=".ant.properties" />
  +  <property file="${user.home}/.ant.properties" />
   
     <property name="Name" value="Ant"/>
     <property name="name" value="ant"/>
     <property name="version" value="1.3alpha"/>
   
  -  <property name="ant.home" value="."/>
  -  <property name="src.bin.dir" value="src/bin"/>
  -  <property name="src.etc.dir" value="src/etc"/>
  -  <property name="src.dir" value="src/main"/>
  -  <property name="srclib.dir" value="lib"/>
  -  <property name="src.tests.dir" value="src/testcases"/>
  -  <property name="docs.dir" value="docs"/>
  -  <property name="build.dir" value="../build/ant"/>
  -  <property name="lib.dir" value="${build.dir}/lib"/>
  -  <property name="bin.dir" value="${build.dir}/bin"/>
  -  <property name="build.classes.core" value="${build.dir}/classes/core"/>
  -  <property name="build.classes.optional" value="${build.dir}/classes/optional"/>
  +  <!-- 
  +       ===================================================================
  +       Set the properties for source directories
  +       =================================================================== 
  +  -->
  +  <property name="src.base" value="src"/>
  +  <property name="manifest.dir" value="${src.base}/manifest"/>
  +  <property name="java.dir" value="${src.base}/main"/>
  +  <property name="script.dir" value="${src.base}/script"/>
  +  <property name="lib.dir" value="lib"/>
  +
  +  <!-- 
  +       ===================================================================
  +       Set the properties for intermediate directory
  +       =================================================================== 
  +  -->
  +  <property name="build.dir" value="build"/>
  +  <property name="build.lib" value="${build.dir}/lib"/>
  +  <property name="build.src" value="${build.dir}/src"/>
  +  <property name="build.classes" value="${build.dir}/classes"/>
     <property name="build.javadocs" value="${build.dir}/javadocs"/>
  +  <property name="build.docs" value="${build.dir}/docs"/>
     <property name="build.tests" value="${build.dir}/testcases"/>
  -  <property name="ant.dist.dir" value="../dist/ant"/>
   
  +  <!-- 
  +       ===================================================================
  +       Set the properties related dist target
  +       =================================================================== 
  +  -->
  +  <property name="dist.name" value="${Name}-${version}"/>
  +<!--   <property name="dist.dir" value="${dist.name}"/> -->
  +  <property name="dist.dir" value="dist"/>
  +  <property name="dist.bin" value="${dist.dir}/bin"/>
  +  <property name="dist.lib" value="${dist.dir}/lib"/>
  +  <property name="dist.docs" value="${dist.dir}/docs"/>
  +  <property name="dist.javadocs" value="${dist.dir}/docs/api"/>
  +
  +  <property name="java.dir" value="src/main"/>
  +  <property name="docs.dir" value="docs"/>
  +  <property name="tests.dir" value="src/testcases"/>
  +
     <path id="classpath">
  +    <pathelement path="${java.class.path}"/>
  +    <fileset dir="lib/optional">
  +      <include name="*.jar"/>
  +      <include name="*.zip"/>
  +    </fileset>
  +  </path>
  +
  +  <path id="tests-classpath">
  +    <pathelement location="${build.classes}" />
  +    <pathelement location="${build.tests}" />
  +    <path refid="classpath" />
     </path>
  +
  +  <property name="ant.package" value="org/apache/tools/ant"/>
  +  <property name="optional.package" value="${ant.package}/taskdefs/optional"/>
     <property name="packages" value="org.apache.tools.*"/>
     <property name="manifest" value="src/etc/manifest"/>
   
  -
     <!-- =================================================================== -->
     <!-- Set some the defaults the user can override in .ant.properties      -->
     <!-- =================================================================== -->
  -  <property name="build.compiler"/>
     <property name="build.compiler.emacs" value="on"/>
  +  <property name="build.compiler.warnings" value="true"/>
  +  <property name="build.compiler.depend" value="true"/>
  +  <property name="build.compiler.fulldepend" value="true"/>
  +
  +  <property name="debug" value="false" />
  +  <property name="deprecation" value="false" />
  +  <property name="optimize" value="true" />
     <property name="junit.fork" value="false" />
  -  <property name="javac.optimize" value="true" />
   
  -  <!-- =================================================================== -->
  -  <!-- Define a global set of patterns that can be referenced by           -->
  -  <!-- its id attribute                                                    -->
  -  <!-- =================================================================== -->
  -  <patternset id="chmod.patterns">
  -    <include name="**/ant" />
  -    <include name="**/antRun" />
  -    <include name="**/bootstrap.sh" />
  -    <include name="**/build.sh" />
  -  </patternset>
  + <!--
  +       ===================================================================
  +                                  Main target
  +       ===================================================================
  +  -->
  +  <target name="main" depends="dist-lite" />
   
     <!-- =================================================================== -->
     <!-- Check to see what optional dependencies are available               -->
  @@ -62,159 +102,191 @@
     <target name="check_for_optional_packages">
       <available property="jdk1.2+" classname="java.lang.ThreadLocal" />
       <available property="jdk1.3+" classname="java.lang.StrictMath" />
  -    <available property="bsf.present" classname="com.ibm.bsf.BSFManager" />
  -    <available property="netrexx.present" classname="netrexx.lang.Rexx" />
  +    <available property="bsf.present" 
  +               classname="com.ibm.bsf.BSFManager" 
  +               classpathref="classpath" />
  +    <available property="netrexx.present" 
  +               classname="netrexx.lang.Rexx"
  +               classpathref="classpath" />
       <available property="xslp.present" 
  -               classname="com.kvisco.xsl.XSLProcessor" />
  +               classname="com.kvisco.xsl.XSLProcessor" 
  +               classpathref="classpath" />
       <available property="trax.present" 
  -               classname="javax.xml.transform.Transformer" />
  +               classname="javax.xml.transform.Transformer" 
  +               classpathref="classpath" />
       <available property="xalan.present" 
  -               classname="org.apache.xalan.xslt.XSLTProcessorFactory" />
  -    <available property="ejb.ejbc.present" classname="weblogic.ejbc" />
  -    <available property="ejb.DDCreator.present" classname="weblogic.ejb.utils.DDCreator" />
  -    <available property="ejb.wls.present" classname="weblogic.Server" />
  -    <available property="junit.present" classname="junit.framework.TestCase" />
  -    <available property="netcomp.present" classname="com.oroinc.net.ftp.FTPClient" />
  -    <available property="starteam.present" classname="com.starbase.util.Platform" />
  -    <available property="antlr.present" classname="antlr.Tool" />
  -    <available property="vaj.present" classname="com.ibm.ivj.util.base.Workspace" />
  -    <available property="stylebook.present" classname="org.apache.stylebook.Engine" />
  -    <available property="jakarta.regexp.present" classname="org.apache.regexp.RE" />
  -    <available property="jakarta.oro.present" classname="org.apache.oro.text.regex.Perl5Matcher" />
  -    <available property="jmf.present" classname="javax.sound.sampled.Clip" />
  -  </target>
  +               classname="org.apache.xalan.xslt.XSLTProcessorFactory" 
  +               classpathref="classpath" />
  +    <available property="ejb.ejbc.present" 
  +               classname="weblogic.ejbc" 
  +               classpathref="classpath" />
  +    <available property="ejb.DDCreator.present" 
  +               classname="weblogic.ejb.utils.DDCreator" 
  +               classpathref="classpath" />
  +    <available property="ejb.wls.present" 
  +               classname="weblogic.Server" 
  +               classpathref="classpath" />
  +    <available property="junit.present" 
  +               classname="junit.framework.TestCase" 
  +               classpathref="classpath" />
  +    <available property="netcomp.present" 
  +               classname="com.oroinc.net.ftp.FTPClient" 
  +               classpathref="classpath" />
  +    <available property="starteam.present" 
  +               classname="com.starbase.util.Platform" 
  +               classpathref="classpath" />
  +    <available property="antlr.present" 
  +               classname="antlr.Tool" 
  +               classpathref="classpath"/>
  +    <available property="vaj.present" 
  +               classname="com.ibm.ivj.util.base.Workspace"  
  +               classpathref="classpath"/>
  +    <available property="stylebook.present" 
  +               classname="org.apache.stylebook.Engine"  
  +               classpathref="classpath"/>
  +    <available property="jakarta.regexp.present" 
  +               classname="org.apache.regexp.RE"  
  +               classpathref="classpath"/>
  +    <available property="jakarta.oro.present" 
  +               classname="org.apache.oro.text.regex.Perl5Matcher"  
  +               classpathref="classpath" />
  +    <available property="jmf.present" 
  +               classname="javax.sound.sampled.Clip"  
  +               classpathref="classpath"/>
  +  </target>
  +
  + <!--
  +       ===================================================================
  +                         Prepares the build
  +       ===================================================================
  +  -->
  +  <target name="prepare" depends="check_for_optional_packages">
  +    <tstamp />
   
  -  <!-- =================================================================== -->
  -  <!-- Prepares the build directory                                        -->
  -  <!-- =================================================================== -->
  -  <target name="prepare">
  +    <property name="version" value="${version}"/>
  +    <property name="date" value="${TODAY}"/>
  +
       <mkdir dir="${build.dir}"/>
  -    <tstamp />
  -  </target>
  +    <mkdir dir="${build.src}"/>
  +    <mkdir dir="${build.lib}"/>
  +    <mkdir dir="${build.classes}"/>
  +
  +    <copy todir="${build.src}">
  +      <fileset dir="${java.dir}"/>
  +    </copy>
  +
  +    <replace file="${build.src}/org/apache/tools/ant/version.txt" 
  +             token="@VERSION@" 
  +             value="${version}"/>
  +    <replace file="${build.src}/org/apache/tools/ant/version.txt" 
  +             token="@DATE@"
  +             value="${date}"/>
  +    <replace file="${build.src}/org/apache/tools/ant/defaultManifest.mf" 
  +             token="@VERSION@" 
  +             value="${version}"/>
   
  -  <!-- =================================================================== -->
  -  <!-- Compiles the source code                                            -->
  -  <!-- =================================================================== -->
  -  <target name="compile-core" depends="prepare,check_for_optional_packages">
  -    <mkdir dir="${build.classes.core}"/>
  +  </target>
   
  -    <javac srcdir="${src.dir}"
  -           destdir="${build.classes.core}"
  -           debug="on"
  -           deprecation="off"
  -           optimize="${javac.optimize}" >
  +  <!-- 
  +       ===================================================================
  +       Compiles the source code
  +       =================================================================== 
  +  -->
  +  <target name="compile" depends="prepare">
  +
  +    <javac srcdir="${build.src}"
  +           destdir="${build.classes}"
  +           debug="${debug}"
  +           deprecation="${deprecation}"
  +           optimize="${optimize}" >
         <classpath refid="classpath" />
   
  -      <exclude name="org/apache/tools/ant/taskdefs/optional/**/*.java"/>
  -      <exclude name="**/JakartaRegexpMatcher.java" unless="jakarta.regexp.present" />
  -      <exclude name="**/JakartaOroMatcher.java" unless="jakarta.oro.present" />
  +      <exclude name="${ant.package}/util/regexp/JakartaRegexpMatcher.java" 
  +               unless="jakarta.regexp.present" />
  +      <exclude name="${ant.package}/util/regexp/JakartaOroMatcher.java" 
  +               unless="jakarta.oro.present" />
  +      <exclude name="${optional.package}/Script.java" unless="bsf.present" />
  +      <exclude name="${optional.package}/StyleBook.java" unless="stylebook.present" />
  +      <exclude name="${optional.package}/NetRexxC.java" unless="netrexx.present" />
  +      <exclude name="${optional.package}/XslpLiaison.java" unless="xslp.present" />
  +      <exclude name="${optional.package}/XalanLiaison.java" unless="xalan.present" />
  +      <exclude name="${optional.package}/TraXLiaison.java" unless="trax.present" />
  +      <exclude name="${optional.package}/ejb/Ejbc*.java" unless="ejb.ejbc.present" />
  +      <exclude name="${optional.package}/ejb/DDCreator*.java" unless="ejb.DDCreator.present" />
  +      <exclude name="${optional.package}/ejb/WLRun.java" unless="ejb.wls.present" />
  +      <exclude name="${optional.package}/ejb/WLStop.java" unless="ejb.wls.present" />
  +      <exclude name="${optional.package}/ejb/EjbJar.java" unless="jdk1.2+" />
  +      <exclude name="${optional.package}/ejb/*DeploymentTool.java" unless="jdk1.2+" />
  +      <exclude name="${optional.package}/Javah.java" unless="jdk1.2+" />
  +      <exclude name="${optional.package}/junit/*" unless="junit.present" />
  +      <exclude name="${optional.package}/net/*.java" unless="netcomp.present" />
  +      <exclude name="${optional.package}/scm/AntStarTeam*.java" unless="starteam.present" />
  +      <exclude name="${optional.package}/ANTLR.java" unless="antlr.present" />
  +      <exclude name="${optional.package}/ide/VAJ*.java" unless="vaj.present" />
  +      <exclude name="${optional.package}/perforce/*.java" unless="jakarta.oro.present" />
  +      <exclude name="${optional.package}/sound/*.java" unless="jmf.present" />
       </javac>
  - 
  -    <copy todir="${build.classes.core}">
  -      <fileset dir="${src.dir}">
  -        <include name="**/*.properties" />
  -      </fileset>
  -    </copy>
   
  -    <filter token="VERSION" value="${version}" />
  -    <filter token="DATE" value="${TODAY}" />
  -    <filter token="TIME" value="${TSTAMP}" />
  -    <copy    todir="${build.classes.core}" 
  -             overwrite="true"
  -             filtering="on">
  -      <fileset dir="${src.dir}">
  -        <include name="**/version.txt" />
  -        <include name="**/defaultManifest.mf" />
  -      </fileset>
  -    </copy>
     </target>
  -
  -  <target name="compile-optional" depends="compile-core">
  -    <mkdir dir="${build.classes.optional}"/>
   
  -    <javac srcdir="${src.dir}"
  -           destdir="${build.classes.optional}"
  -           debug="on"
  -           deprecation="off"
  -           optimize="${javac.optimize}" >
  -      <classpath> 
  -        <path refid="classpath" />
  -        <pathelement location="${build.classes.core}" />
  -      </classpath>
  -      
  -      <include name="org/apache/tools/ant/taskdefs/optional/**/*.java"/>
  -      <exclude name="**/Script.java" unless="bsf.present" />
  -      <exclude name="**/StyleBook.java" unless="stylebook.present" />
  -      <exclude name="**/NetRexxC.java" unless="netrexx.present" />
  -      <exclude name="**/XslpLiaison.java" unless="xslp.present" />
  -      <exclude name="**/XalanLiaison.java" unless="xalan.present" />
  -      <exclude name="**/TraXLiaison.java" unless="trax.present" />
  -      <exclude name="**/Ejbc*.java" unless="ejb.ejbc.present" />
  -      <exclude name="**/DDCreator*.java" unless="ejb.DDCreator.present" />
  -      <exclude name="**/WLRun.java" unless="ejb.wls.present" />
  -      <exclude name="**/WLStop.java" unless="ejb.wls.present" />
  -      <exclude name="**/EjbJar.java" unless="jdk1.2+" />
  -      <exclude name="**/*DeploymentTool.java" unless="jdk1.2+" />
  -      <exclude name="**/Javah.java" unless="jdk1.2+" />
  -      <exclude name="**/junit/*" unless="junit.present" />
  -      <exclude name="**/net/*.java" unless="netcomp.present" />
  -      <exclude name="**/AntStarTeam*.java" unless="starteam.present" />
  -      <exclude name="**/ANTLR.java" unless="antlr.present" />
  -      <exclude name="**/ide/VAJ*.java" unless="vaj.present" />
  -      <exclude name="**/perforce/*.java" unless="jakarta.oro.present" />
  -      <exclude name="org/apache/tools/ant/taskdefs/optional/sound/*.java" 
  -               unless="jmf.present" />
  -    </javac>
  -  </target>
  +  <!-- 
  +       =================================================================== 
  +       Creates the lib directory including the ant jars, ant.jar and       
  +       optional.jar                                                        
  +       =================================================================== 
  +  -->
  +  <target name="jars" depends="compile">
  +
  +    <jar jarfile="${build.lib}/${name}.jar" basedir="${build.classes}" manifest="${manifest}">
  +      <exclude name="org/apache/tools/ant/taskdefs/optional/**" />
  +    </jar>
  +
  +    <jar jarfile="${build.lib}/optional.jar" basedir="${build.classes}" manifest="${manifest}">
  +      <include name="org/apache/tools/ant/taskdefs/optional/**" />
  +    </jar>
   
  -  <!-- =================================================================== -->
  -  <!-- Creates the lib directory including the ant jars, ant.jar and       -->
  -  <!-- optional.jar                                                        -->
  -  <!-- =================================================================== -->
  -  <target name="jars" depends="compile-core, compile-optional">
  -    <mkdir dir="${lib.dir}"/>
  -    <jar jarfile="${lib.dir}/${name}.jar"
  -         basedir="${build.classes.core}"
  -         includes="org/**"
  -         manifest="${manifest}"
  -    />
  -    <jar jarfile="${lib.dir}/optional.jar"
  -         basedir="${build.classes.optional}"
  -         includes="org/**"
  -         manifest="${manifest}"
  -    />
  -    <copy todir="${lib.dir}">
  -        <fileset dir="${srclib.dir}">
  -            <include name="**/*.jar"/>
  -            <exclude name="ant.jar"/>
  -        </fileset>
  -    </copy>
     </target>
   
  -  <!-- =================================================================== -->
  -  <!-- Creates the binary structure                                        -->
  -  <!-- =================================================================== -->
  -  <target name="main" depends="jars" description="Creates the binary structure">
  -     <mkdir dir="${bin.dir}"/>
  -     <copy todir="${bin.dir}">
  -       <fileset dir="${src.bin.dir}"/>
  -     </copy>
  -     <chmod perm="+x">
  -       <fileset dir="${bin.dir}">
  -         <patternset refid="chmod.patterns"/>
  +  <!--
  +       ===================================================================
  +                         Create the test build
  +       ===================================================================
  +  -->
  +  <target name="dist-lite" depends="jars">
  +
  +    <mkdir dir="${dist.dir}"/>
  +    <mkdir dir="${dist.bin}"/>
  +    <mkdir dir="${dist.lib}"/>
  +
  +    <copy todir="${dist.lib}">
  +      <fileset dir="${build.lib}"/>
  +    </copy>
  +    
  +    <copy todir="${dist.bin}">
  +      <fileset dir="${script.dir}/" />
  +    </copy>
  +
  +    <chmod dir="${dist.dir}" perm="go-rwx" />
  +    <chmod perm="u+x">
  +       <fileset dir="${dist.bin}">
  +         <include name="**/ant" />
  +         <include name="**/antRun" />
          </fileset>
        </chmod>
  -     <fixcrlf srcdir="${bin.dir}" includes="ant,antRun" cr="remove"/>
  -     <fixcrlf srcdir="${bin.dir}" includes="*.bat" cr="add"/>
  +
  +    <fixcrlf srcdir="${dist.dir}" cr="add" includes="**/*.bat" />
  +    <fixcrlf srcdir="${dist.dir}" cr="remove" includes="**/*.sh" />
  +    <fixcrlf srcdir="${dist.dir}" cr="remove" includes="ant" />
  +
     </target>
   
     <!-- =================================================================== -->
     <!-- Creates the API documentation                                       -->
     <!-- =================================================================== -->
  -  <target name="javadocs" depends="prepare" description="Creates the API documentation">
  +  <target name="javadocs" depends="prepare" description="Creates the API documentation" unless="foo">
       <mkdir dir="${build.javadocs}"/>
  -    <javadoc packagenames="${packages}"
  -             sourcepath="${basedir}/${src.dir}"
  +    <javadoc packagenames="org.apache.*"
  +             sourcepath="${build.src}"
                destdir="${build.javadocs}"
                author="true"
                version="true"
  @@ -226,182 +298,121 @@
         <group title="Optional Tasks" packages="org.apache.tools.ant.taskdefs.optional*" />
       </javadoc>
     </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- Creates the distribution                                            -->
  -  <!-- =================================================================== -->
  -  <target name="dist" depends="main,jars,javadocs" description="Creates the distribution">
  -     <mkdir dir="${ant.dist.dir}"/>
  -     <mkdir dir="${ant.dist.dir}/bin"/>
  -     <mkdir dir="${ant.dist.dir}/lib"/>
  -     <mkdir dir="${ant.dist.dir}/docs"/>
  -     <mkdir dir="${ant.dist.dir}/docs/api"/>
  -     <mkdir dir="${ant.dist.dir}/src"/>
  -
  -     <copy todir="${ant.dist.dir}/src">
  -       <fileset dir="${src.dir}"/>
  -     </copy>
  -     <copy todir="${ant.dist.dir}/lib">
  -       <fileset dir="${lib.dir}"/>
  -     </copy>
  -
  -     <copy file="build.xml" tofile="${ant.dist.dir}/lib/build.xml"/>
  -     <copy todir="${ant.dist.dir}/bin">
  -       <fileset dir="src/bin"/>
  -     </copy>
  -     <filter token="VERSION" value="${version}"/>
  -     <copy todir="${ant.dist.dir}/docs" filtering="on">
  -       <fileset dir="${docs.dir}"/>
  -     </copy>
  -     <copy todir="${ant.dist.dir}/docs/api">
  -       <fileset dir="${build.javadocs}"/>
  -     </copy>
  -
  -     <fixcrlf srcdir="${ant.dist.dir}/bin" includes="ant,antRun" cr="remove"/>
  -     <fixcrlf srcdir="${ant.dist.dir}/bin" includes="*.bat" cr="add"/>
  -     <chmod perm="+x">
  -       <fileset dir="${ant.dist.dir}/bin">
  -         <patternset refid="chmod.patterns"/>
  -       </fileset>
  -     </chmod>
   
  -     <copy file="README" tofile="${ant.dist.dir}/README"/>
  -     <copy file="WHATSNEW" tofile="${ant.dist.dir}/WHATSNEW"/>
  -     <copy file="TODO" tofile="${ant.dist.dir}/TODO"/>
  -     <copy file="LICENSE" tofile="${ant.dist.dir}/LICENSE"/>
  -  </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- Packages the distribution with ZIP                                  -->
  -  <!-- =================================================================== -->
  -  <target name="dist-zip" depends="dist">
  -    <zip zipfile="${Name}-${version}.zip" basedir="${ant.dist.dir}" includes="**"/>
  -  </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- Packages the distribution with TAR-GZIP                             -->
  -  <!-- =================================================================== -->
  -  <target name="dist-tgz" depends="dist">
  -    <tar tarfile="${Name}-${version}.tar" basedir="${ant.dist.dir}" includes="**"/>
  -    <gzip zipfile="${Name}-${version}.tar.gz" src="${Name}-${version}.tar"/>
  -  </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- Installs the ant jars and binary files into ant.home                -->
  -  <!-- =================================================================== -->
  -  <target name="bootstrap" depends="main" description="Installs the ant.jar library and binary files into ant.home">
  -    <echo message="copying bootstrapped files into bin and lib"/>
  -    <copy todir="lib">
  -      <fileset dir="${lib.dir}"/>
  -    </copy>
  -    <copy todir="bin">
  -      <fileset dir="${bin.dir}"/>
  + <!--
  +       ===================================================================
  +                            Create the distribution
  +       ===================================================================
  +  -->
  +  <target name="dist" depends="dist-lite,javadocs">
  +    <mkdir dir="${dist.docs}"/>
  +    <mkdir dir="${dist.javadocs}"/>
  +
  +    <copy todir="${dist.lib}">
  +      <fileset dir="${lib.dir}">
  +        <include name="*" />
  +      </fileset>
       </copy>
  -  </target>     
   
  -  <target name="install" depends="dist" if="ant.install">
  -    <echo message="installing full copy of ant into ${ant.install}"/>
  -    <mkdir dir="${ant.install}"/>
  -    <copy todir="${ant.install}">
  -      <fileset dir="${ant.dist.dir}"/>
  +    <copy todir="${dist.docs}">
  +      <fileset dir="${docs.dir}"/>
       </copy>
  -    <chmod perm="+x">
  -      <fileset dir="${ant.install}/bin">
  -        <patternset refid="chmod.patterns"/>
  -      </fileset>
  -    </chmod>
  -  </target>     
   
  -  <target name="fullinstall" depends="install"/>
  -  
  -  <target name="mininstall" depends="main" if="ant.install">
  -    <echo message="copying minimal ant installation into ${ant.install}"/>
  -    <mkdir dir="${ant.install}"/>
  -    <copy todir="${ant.install}/lib">
  -      <fileset dir="${lib.dir}"/>
  -    </copy>
  -    <copy todir="${ant.install}/bin">
  -      <fileset dir="${bin.dir}"/>
  -    </copy>
  -    <chmod perm="+x">
  -      <fileset dir="${ant.install}/bin">
  -        <patternset refid="chmod.patterns"/>
  +    <!--
  +    <copy todir="${dist.javadocs}">
  +      <fileset dir="${build.javadocs}"/>
  +    </copy>
  +    -->
  +
  +    <copy todir="${dist.dir}">
  +      <fileset dir=".">
  +        <include name="README"/>
  +        <include name="LICENSE"/>
  +        <include name="TODO"/>
  +        <include name="WHATSNEW"/>
         </fileset>
  -    </chmod>
  -  </target>     
  -
  -  <!-- =================================================================== -->
  -  <!-- Cleans up generated stuff                                           -->
  -  <!-- =================================================================== -->
  -  <target name="clean">
  -    <delete dir="${build.dir}"/>
  -    <delete dir="${ant.dist.dir}"/>
  -    <delete>
  -      <fileset dir="." includes="**/*~" defaultexcludes="no"/>
  -    </delete>
  -  </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- Total cleanup                                                       -->
  -  <!-- =================================================================== -->
  -  <target name="total-clean" depends="clean">
  -    <delete dir="${bin.dir}"/>
  -    <delete file="${Name}-${version}.zip"/>
  -    <delete file="${Name}-${version}.tar"/>
  -    <delete file="${Name}-${version}.tar.gz"/>
  -  </target>
  +    </copy>
   
  -  <!-- in progress ! (may not work) -->
  +    <chmod dir="${dist.dir}" perm="go-rwx" />
   
  -  <target name="get.snapshot">
  -    <get src="http://jakarta.apache.org/build/tmp/ant/ant.src.zip" dest="ant-src.zip" />
  -    <unzip src="ant-src.zip" dest="." />
  +    <zip zipfile="${dist.name}.zip" basedir="${dist.dir}/.." includes="${dist.dir}/**"/>
  +    <tar tarfile="${dist.name}.tar" basedir="${dist.dir}/.." includes="${dist.dir}/**"/>
  +    <gzip zipfile="${dist.name}.tar.gz" src="${dist.name}.tar"/>
  +    <delete file="${dist.name}.tar"/>
     </target>
   
  -  <target name="make.snapshot">
  -    <cvs cvsRoot=":pserver:anoncvs@jakarta.apache.org:/home/cvspublic"
  -         package="jakarta-ant"
  -         dest="."  />
  -    <zip zipfile="/www/jakarta.apache.org/builds/tmp/ant/ant.src.zip" basedir="." includes="jakarta-ant/**"/>
  -  </target>
  +  <!--
  +       ===================================================================
  +                 Cleans up build and distribution directories
  +       ===================================================================
  +  -->
  +  <target name="clean">
  +    <delete dir="${build.dir}" />
  +    <delete dir="${dist.dir}" />
  +    <delete> 
  +      <fileset dir="." includes="**/*~" defaultexcludes="no"/>
  +    </delete>
  +  </target> 
   
  -  <!-- =================================================================== -->
  -  <!-- Compile testcases                                                   -->
  -  <!-- =================================================================== -->
  -  <target name="compiletests" depends="jars" if="junit.present">
  +  <!--
  +       ===================================================================
  +                      Cleans absolutely everything up
  +       ===================================================================
  +  -->
  +  <target name="real-clean" depends="clean">
  +    <delete dir="${docs.dir}" />
  +    <delete file="${dist.name}.tar.gz" />
  +    <delete file="${dist.name}.zip" />
  +  </target>
  +
  +  <!-- 
  +       =================================================================== 
  +       Compile testcases                                                   
  +       =================================================================== 
  +  -->
  +  <target name="compile-tests" depends="compile" if="junit.present">
       <mkdir dir="${build.tests}"/>
   
  -    <javac srcdir="${src.tests.dir}"
  +    <javac srcdir="${tests.dir}"
              destdir="${build.tests}"
  -           debug="on"
  -           deprecation="off" >
  -      <classpath>
  -        <pathelement location="${lib.dir}/${name}.jar" />
  -        <path refid="classpath" />
  -      </classpath>
  -      <exclude name="org/apache/tools/ant/taskdefs/optional/ANTLRTest.java" unless="antlr.present" />
  -      <exclude name="org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java" unless="jakarta.regexp.present" />
  -      <exclude name="org/apache/tools/ant/util/regexp/JakartaOroMatcherTest.java" unless="jakarta.oro.present" />
  +           debug="${debug}"
  +           deprecation="${deprecation}" >
  +      <classpath refid="tests-classpath" />
  +
  +      <exclude name="org/apache/tools/ant/taskdefs/optional/ANTLRTest.java" 
  +               unless="antlr.present" />
  +      <exclude name="org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java" 
  +               unless="jakarta.regexp.present" />
  +      <exclude name="org/apache/tools/ant/util/regexp/JakartaOroMatcherTest.java" 
  +               unless="jakarta.oro.present" />
       </javac>
  -   </target>
  +  </target>
   
  -  <!-- =================================================================== -->
  -  <!-- Run testcase                                                        -->
  -  <!-- =================================================================== -->
  -  <target name="runtests" depends="compiletests" if="junit.present">
  +  <!-- 
  +      =================================================================== 
  +      Run testcase                                                        
  +      =================================================================== 
  +  -->
  +  <target name="define-junit" if="junit.present">
  +    <taskdef name="junit" 
  +             classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"
  +             classpath="tests-classpath" />
  +  </target>
  +  
  +  <!-- 
  +       =================================================================== 
  +       Run testcase                                                        
  +       =================================================================== 
  +  -->
  +  <target name="run-tests" depends="compile-tests, define-junit" if="junit.present">
       <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
         <jvmarg value="-classic"/>
  -      <classpath>
  -        <pathelement location="${lib.dir}/${name}.jar" />
  -        <pathelement location="${build.tests}" />
  -        <path refid="classpath" />
  -        <pathelement path="${java.class.path}" />
  -      </classpath>
  +      <classpath refid="tests-classpath"/>
   
         <formatter type="plain" usefile="false" />
   
         <batchtest>
  -        <fileset dir="${src.tests.dir}">
  +        <fileset dir="${tests.dir}">
             <include name="**/*Test*" />
             <!-- abstract class, not a testcase -->
             <exclude name="org/apache/tools/ant/taskdefs/TaskdefsTest.java" />
  @@ -412,10 +423,12 @@
             <exclude name="org/apache/tools/ant/taskdefs/GzipTest.java" />
   
             <!-- only run this test if ANTLR is installed -->
  -          <exclude name="org/apache/tools/ant/taskdefs/optional/ANTLRTest.java" unless="antlr.present" />
  -
  -          <exclude name="org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java" unless="jakarta.regexp.present" />
  -          <exclude name="org/apache/tools/ant/util/regexp/JakartaOroMatcherTest.java" unless="jakarta.oro.present" />
  +          <exclude name="org/apache/tools/ant/taskdefs/optional/ANTLRTest.java" 
  +                   unless="antlr.present" />
  +          <exclude name="org/apache/tools/ant/util/regexp/JakartaRegexpMatcherTest.java" 
  +                   unless="jakarta.regexp.present" />
  +          <exclude name="org/apache/tools/ant/util/regexp/JakartaOroMatcherTest.java" 
  +                   unless="jakarta.oro.present" />
           </fileset>
         </batchtest>
   
  @@ -424,172 +437,21 @@
       </junit>
   
       <!-- clean up again -->
  -    <delete dir="src/etc/testcases/taskdefs/optional/antlr/antlr.tmp" />
  -    <delete dir="src/etc/testcases/taskdefs/taskdefs.tmp" />
  -    <delete dir="src/etc/testcases/taskdefs.tmp" />
  -    <delete file="src/etc/testcases/taskdefs/tmp.jar" />
  +    <delete dir="${tests.dir}/taskdefs/optional/antlr/antlr.tmp" />
  +    <delete dir="${tests.dir}/taskdefs/taskdefs.tmp" />
  +    <delete dir="${tests.dir}/taskdefs.tmp" />
  +    <delete file="${tests.dir}/taskdefs/tmp.jar" />
     </target>
  +
  +  <target name="run-single-test" if="testcase, define-junit" depends="compile-tests">
   
  -  <target name="run.single.test" if="testcase" depends="compiletests">
       <junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
         <jvmarg value="-classic"/>
  -      <classpath>
  -        <pathelement location="${lib.dir}/${name}.jar" />
  -        <pathelement location="${build.tests}" />
  -        <path refid="classpath" />
  -        <pathelement path="${java.class.path}" />
  -      </classpath>
  -
  +      <classpath refid="tests-classpath"/>
         <formatter type="plain" usefile="false" />
  -
         <test name="${testcase}" />
       </junit>
     </target>
  -
  -  <!-- =================================================================== -->
  -  <!-- Targets to build distributions, probaly not that useful for         -->
  -  <!-- anybody but the people doing Ant releases.                          -->
  -  <!-- =================================================================== -->
  -
  -  <property name="ant.srcdist.dir" value="../dist/jakarta-ant-src"/>
  -
  -  <target name="srcbuild">
  -     <mkdir dir="${ant.srcdist.dir}" />
  -     <mkdir dir="${ant.srcdist.dir}/lib" />
  -
  -     <copy todir="${ant.srcdist.dir}">
  -       <fileset dir=".">
  -         <exclude name="bin/**" />
  -         <exclude name="lib/*.jar" />
  -       </fileset>
  -     </copy>
  -
  -     <fixcrlf srcdir="${ant.srcdist.dir}" includes="ant,antRun,bootstrap.sh,build.sh" cr="remove"/>
  -     <fixcrlf srcdir="${ant.srcdist.dir}" includes="*.bat" cr="add"/>
  -     <chmod perm="+x">
  -       <fileset dir="${ant.srcdist.dir}">
  -         <patternset refid="chmod.patterns"/>
  -       </fileset>
  -     </chmod>
  -  </target>
  -  
  -  <target name="src.zip" depends="srcbuild">
  -    <zip zipfile="${ant.srcdist.dir}/../jakarta-ant-src.zip" 
  -         basedir="${ant.srcdist.dir}" />
  -  </target>
  -
  -  <target name="src.tgz" depends="srcbuild">
  -    <property name="src.tar" 
  -              value="${ant.srcdist.dir}/../jakarta-ant-src.tar" />
  -    <tar tarfile="${src.tar}" basedir="${ant.srcdist.dir}" />
  -    <gzip src="${src.tar}" zipfile="${src.tar}.gz" />
  -    <delete file="${src.tar}" />
  -  </target>
  -
  -  <target name="srcdist" description="Creates the source distribution"
  -          depends="src.zip,src.tgz" />
  -
  -  <property name="ant.bindist.dir" value="../dist/jakarta-ant-bin"/>
  -
  -  <target name="binbuild" depends="compile-core">
  -
  -    <mkdir dir="${ant.bindist.dir}"/>
  -    <mkdir dir="${ant.bindist.dir}/bin"/>
  -    <mkdir dir="${ant.bindist.dir}/src"/>
  -    <mkdir dir="${ant.bindist.dir}/etc"/>
  -    <mkdir dir="${ant.bindist.dir}/lib"/>
  -    <mkdir dir="${ant.bindist.dir}/docs/api"/>
  -
  -    <jar jarfile="${ant.bindist.dir}/lib/${name}.jar"
  -         basedir="${build.classes.core}"
  -         includes="org/**"
  -         manifest="${manifest}"
  -    />
  -
  -    <copy todir="${ant.bindist.dir}/lib">
  -        <fileset dir="${srclib.dir}">
  -            <include name="**/*.jar"/>
  -            <exclude name="ant.jar"/>
  -        </fileset>
  -    </copy>
  -
  -    <copy todir="${ant.bindist.dir}/docs">
  -      <fileset dir="${docs.dir}"/>
  -    </copy>
  -    <javadoc packagenames="${packages}"
  -             sourcepath="${basedir}/${src.dir}"
  -             destdir="${ant.bindist.dir}/docs/api"
  -             author="true"
  -             version="true"
  -             windowtitle="${Name} API"
  -             doctitle="${Name}"
  -             bottom="Copyright &#169; 2000 Apache Software Foundation. All Rights Reserved.">
  -    </javadoc>
  -
  -    <copy todir="${ant.bindist.dir}/src">
  -      <fileset dir="${src.dir}"/>
  -    </copy>
  -
  -    <copy todir="${ant.bindist.dir}/etc">
  -      <fileset dir="${src.etc.dir}">
  -        <exclude name="testcases/**" />
  -      </fileset>
  -    </copy>
  -
  -    <copy todir="${ant.bindist.dir}/bin">
  -      <fileset dir="${src.bin.dir}"/>
  -    </copy>
  -    <fixcrlf srcdir="${ant.bindist.dir}/bin" includes="ant,antRun" cr="remove"/>
  -    <fixcrlf srcdir="${ant.bindist.dir}/bin" includes="*.bat" cr="add"/>
  -    <chmod perm="+x">
  -      <fileset dir="${ant.bindist.dir}/bin">
  -        <patternset refid="chmod.patterns"/>
  -      </fileset>
  -    </chmod>
  -
  -    <copy file="build.xml" tofile="${ant.bindist.dir}/lib/build.xml"/>
  -
  -    <copy file="README" tofile="${ant.bindist.dir}/README"/>
  -    <copy file="WHATSNEW" tofile="${ant.bindist.dir}/WHATSNEW"/>
  -    <copy file="TODO" tofile="${ant.bindist.dir}/TODO"/>
  -    <copy file="LICENSE" tofile="${ant.bindist.dir}/LICENSE"/>
  -
  -  </target>
  -
  -  <target name="bin.zip" depends="binbuild">
  -    <zip zipfile="${ant.bindist.dir}/../jakarta-ant-bin.zip" 
  -         basedir="${ant.bindist.dir}" />
  -  </target>
  -
  -  <target name="bin.tgz" depends="binbuild">
  -    <property name="bin.tar" 
  -              value="${ant.bindist.dir}/../jakarta-ant-bin.tar" />
  -    <tar tarfile="${bin.tar}" basedir="${ant.bindist.dir}" />
  -    <gzip src="${bin.tar}" zipfile="${bin.tar}.gz" />
  -    <delete file="${bin.tar}" />
  -  </target>
  -
  -  <target name="bindist" description="Creates the binary distribution"
  -          depends="bin.zip,bin.tgz" />
  -
  -  <property name="contributed.tasks" value="../build/ant.contrib" />
  -  <property name="optional" value="../dist/optional.jar" />
  -
  -  <target name="optional.jar" depends="compile-optional"
  -          description="Creates a JAR of the optional tasks">
  -    <mkdir dir="${contributed.tasks}" />
  -    <copy todir="${contributed.tasks}">
  -      <fileset dir="${build.classes.optional}">
  -      </fileset>
  -    </copy>
  -    <jar jarfile="${optional}"
  -         basedir="${contributed.tasks}"
  -         manifest="${manifest}"
  -    />
  -  </target>
  -
  -  <target name="release.dist" depends="srcdist,bindist,optional.jar"
  -          description="Creates all five files for a release build" />
   
   </project>
   
  
  
  
  1.1                  jakarta-ant/lib/jaxp.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ant/lib/parser.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ant/lib/optional/README
  
  Index: README
  ===================================================================
  The required libraries should be placed here.
  
  The dependencies are:
  
  junit.jar      - required for junit tasks, available at www.junit.org
  stylebook.jar  - required by stylebook task, available in CVS repository of xml.apache.org
  testlet.jar    - required for test task, available with Avalon via java.apache.org/framework
  jakarta-regexp-1.2.jar - required by some mappers, available at http://jakarta.apache.org/regexp/
  jakarta-oro-2.0.1.jar  - required for some mappers and the perforce tasks, available at http://jakarta.apache.org/oro/
  ???antlr.jar???- required for antlr task, available at www.antlr.org
  bsf.jar        - required for script task, available at http://oss.software.ibm.com/developerworks/opensource/bsf/
  netrexx.jar    - required for netrexx task, available at http://www2.hursley.ibm.com/netrexx
  rhino.jar      - required for script task if you want to use javascript, available at www.mozilla.org
  jpython.jar    - required for script task if you want to use python, available at www.jpython.org
  netcomponents.jar - required by ftp and telnet tasks, available at http://www.savarese.org/oro/downloads/index.html#NetComponents
  
  
  
  1.1                  jakarta-ant/src/script/ant
  
  Index: ant
  ===================================================================
  #! /bin/sh
  
  if [ -f $HOME/.antrc ] ; then 
    . $HOME/.antrc
  fi
  
  # Cygwin support.  $cygwin _must_ be set to either true or false.
  case "`uname`" in
    CYGWIN*) cygwin=true ;;
    *) cygwin=false ;;
  esac
  
  # For Cygwin, ensure paths are in UNIX format before anything is touched
  if $cygwin; then
    [ -n "$ANT_HOME" ] &&
      ANT_HOME=`cygpath --unix "$ANT_HOME"`
    [ -n "$JAVA_HOME" ] &&
      JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
    [ -n "$CLASSPATH" ] &&
      CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
  fi
  
  if [ "$ANT_HOME" = "" ] ; then
    # try to find ANT
    if [ -d /opt/ant ] ; then 
      ANT_HOME=/opt/ant
    fi
  
    if [ -d ${HOME}/opt/ant ] ; then 
      ANT_HOME=${HOME}/opt/ant
    fi
  
    ## resolve links - $0 may be a link to ant's home
    PRG=$0
    progname=`basename $0`
    
    while [ -h "$PRG" ] ; do
      ls=`ls -ld "$PRG"`
      link=`expr "$ls" : '.*-> \(.*\)$'`
      if expr "$link" : '.*/.*' > /dev/null; then
  	PRG="$link"
      else
  	PRG="`dirname $PRG`/$link"
      fi
    done
    
    ANT_HOME=`dirname "$PRG"`/..
  
  fi
  
  if [ "$JAVA_HOME" != "" ] ; then
    if [ "$JAVACMD" = "" ] ; then 
      JAVACMD=$JAVA_HOME/bin/java
    fi
  else
    if [ "$JAVACMD" = "" ] ; then 
      JAVACMD=java
    fi
  fi
   
  # add in the dependency .jar files
  DIRLIBS=${ANT_HOME}/lib/*.jar
  for i in ${DIRLIBS}
  do
      # if the directory is empty, then it will return the input string
      # this is stupid, so case for it
      if [ "$i" != "${DIRLIBS}" ] ; then
          LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
      fi
  done
  DIRCORELIBS=${ANT_HOME}/lib/core/*.jar
  for i in ${DIRCORELIBS}
  do
      # if the directory is empty, then it will return the input string
      # this is stupid, so case for it
      if [ "$i" != "${DIRCORELIBS}" ] ; then
          LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
      fi
  done
  
  if [ "$CLASSPATH" != "" ] ; then
    LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
  fi
  
  if [ "$JAVA_HOME" != "" ] ; then
    if test -f $JAVA_HOME/lib/tools.jar ; then
      LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
    fi
  
    if test -f $JAVA_HOME/lib/classes.zip ; then
      LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
    fi
  else
    echo "Warning: JAVA_HOME environment variable is not set."
    echo "  If build fails because sun.* classes could not be found"
    echo "  you will need to set the JAVA_HOME environment variable"
    echo "  to the installation directory of java."
  fi
  
  # supply JIKESPATH to Ant as jikes.class.path
  if [ "$JIKESPATH" != "" ] ; then
    if [ "$ANT_OPTS" != "" ] ; then
      ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
    else
      ANT_OPTS=-Djikes.class.path=$JIKESPATH
    fi
  fi
  
  # For Cygwin, switch paths to Windows format before running java
  if $cygwin; then
    ANT_HOME=`cygpath --path --windows "$ANT_HOME"`
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
    LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
  fi
  
  $JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main $@
  
  
  
  1.1                  jakarta-ant/src/script/ant.bat
  
  Index: ant.bat
  ===================================================================
  rem @echo off
  
  if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
  
  if not "%OS%"=="Windows_NT" goto start
  
  rem %~dp0 is name of current script under NT
  set DEFAULT_ANT_HOME=%~dp0
  
  rem : operator works similar to make : operator
  set DEFAULT_ANT_HOME=%DEFAULT_ANT_HOME:\bin\=%
  
  if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
  set DEFAULT_ANT_HOME=
  
  :start
  
  rem Slurp the command line arguments.  This loop allows for an unlimited number of 
  rem agruments (up to the command line limit, anyway).
  
  set ANT_CMD_LINE_ARGS=
  
  :setupArgs
  if "%1"=="" goto doneArgs
  set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
  shift
  goto setupArgs
  
  :doneArgs
  rem The doneArgs label is here just to provide a place for the argument list loop
  rem to break out to.
  
  rem find ANT_HOME
  if not "%ANT_HOME%"=="" goto checkJava
  
  rem check for ant in Program Files on system drive
  if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
  set ANT_HOME=%SystemDrive%\Program Files\ant
  goto checkJava
  
  :checkSystemDrive
  rem check for ant in root directory of system drive
  if not exist "%SystemDrive%\ant" goto noAntHome
  set ANT_HOME=%SystemDrive%\ant
  goto checkJava
  
  :noAntHome
  echo ANT_HOME is not set and ant could not be located. Please set ANT_HOME.
  goto end
  
  :checkJava
  set _JAVACMD=%JAVACMD%
  set LOCALCLASSPATH="%CLASSPATH%"
  for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"
  for %%i in ("%ANT_HOME%\lib\core\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"
  
  if "%JAVA_HOME%" == "" goto noJavaHome
  if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java
  if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" "%JAVA_HOME%\lib\tools.jar"
  if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat" "%JAVA_HOME%\lib\classes.zip"
  goto checkJikes
  
  :noJavaHome
  if "%_JAVACMD%" == "" set _JAVACMD=java
  echo.
  echo Warning: JAVA_HOME environment variable is not set.
  echo   If build fails because sun.* classes could not be found
  echo   you will need to set the JAVA_HOME environment variable
  echo   to the installation directory of java.
  echo.
  
  :checkJikes
  if not "%JIKESPATH%" == "" goto runAntWithJikes
  
  :runAnt
  %_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
  goto end
  
  :runAntWithJikes
  %_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" -Djikes.class.path=%JIKESPATH% %ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
  
  :end
  if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
  set LOCALCLASSPATH=
  set ANT_CMD_LINE_ARGS=
  
  
  
  
  1.1                  jakarta-ant/src/script/antRun
  
  Index: antRun
  ===================================================================
  #! /bin/sh
  
  # Args: DIR command
  cd "$1"
  CMD="$2"
  shift
  shift
  
  exec $CMD "$@"
  
  
  
  1.1                  jakarta-ant/src/script/antRun.bat
  
  Index: antRun.bat
  ===================================================================
  @echo off
  
  cd %1
  set ANT_RUN_CMD=%2
  shift
  shift
  
  set PARAMS=
  :loop
  if ""%1 == "" goto runCommand
  set PARAMS=%PARAMS% %1
  shift
  goto loop
  
  :runCommand
  rem echo %ANT_RUN_CMD% %PARAMS%
  %ANT_RUN_CMD% %PARAMS%
  
  
  
  
  1.1                  jakarta-ant/src/script/lcp.bat
  
  Index: lcp.bat
  ===================================================================
  set LOCALCLASSPATH=%1;%LOCALCLASSPATH%
  
  
  
  
  1.1                  jakarta-ant/src/script/runant.pl
  
  Index: runant.pl
  ===================================================================
  #!/usr/local/bin/perl
  #######################################################################
  #
  # runant.pl
  #
  # wrapper script for invoking ant in a platform with Perl installed
  # this may include cgi-bin invocation, which is considered somewhat daft.
  # (slo: that should be a separate file which can be derived from this
  # and returns the XML formatted output)
  #
  # the code is not totally portable due to classpath and directory splitting
  # issues. oops. (NB, use File::Spec::Functions  will help and the code is
  # structured for the catfile() call, but because of perl version funnies
  # the code is not included. 
  #
  # created:         2000-8-24
  # last modified:   2000-8-24
  # author:          Steve Loughran steve_l@sourceforge.net
  #######################################################################
  #
  # Assumptions:
  #
  # - the "java" executable/script is on the command path
  # - ANT_HOME has been set
  # - target platform uses ":" as classpath separator or perl indicates it is dos/win32
  # - target platform uses "/" as directory separator.
  
  #be fussy about variables
  use strict;
  
  #platform specifics (disabled)
  #use File::Spec::Functions;
  
  #turn warnings on during dev; generates a few spurious uninitialised var access warnings
  #use warnings;
  
  #and set $debug to 1 to turn on trace info
  my $debug=0;
  
  #######################################################################
  #
  # check to make sure environment is setup
  #
  
  my $HOME = $ENV{ANT_HOME};
  if ($HOME eq "")
  	{
      die "\n\nANT_HOME *MUST* be set!\n\n";
  	}
  
  my $JAVACMD = $ENV{JAVACMD};
  $JAVACMD = "java" if $JAVACMD eq "";
  
  #ISSUE: what java wants to split up classpath varies from platform to platform 
  #and perl is not too hot at hinting which box it is on.
  #here I assume ":" 'cept on win32 and dos. Add extra tests here as needed.
  my $s=":";
  if(($^O eq "MSWin32") || ($^O eq "dos"))
  	{
  	$s=";";
  	}
  
  #build up standard classpath
  my $localpath=$ENV{CLASSPATH};
  if ($localpath eq "")
  	{
  	print "warning: no initial classpath\n" if ($debug);
  	$localpath="";
  	}
  
  #add jar files. I am sure there is a perl one liner to do this.
  my $jarpattern="$HOME/lib/*.jar";
  my @jarfiles =glob($jarpattern);
  print "jarfiles=@jarfiles\n" if ($debug);
  my $jar;
  foreach $jar (@jarfiles )
  	{
  	$localpath.="$s$jar";
  	}
  
  #if Java home is defined, look for tools.jar & classes.zip and add to classpath
  my $JAVA_HOME = $ENV{JAVA_HOME};
  if ($JAVA_HOME ne "")
  	{
  	my $tools="$JAVA_HOME/lib/tools.jar";
  	if (-e "$tools")
  		{
  		$localpath .= "$s$tools";
  		}
  	my $classes="$JAVA_HOME/lib/classes.zip";
  	if (-e $classes)
  		{
  		$localpath .= "$s$classes";
  		}
  	}
  else
  	{
      print "\n\nWarning: JAVA_HOME environment variable is not set.\n".
  		"If the build fails because sun.* classes could not be found\n".
  		"you will need to set the JAVA_HOME environment variable\n".
  		"to the installation directory of java\n";
  	}
  
  #jikes
  my @ANT_OPTS=split $ENV{ANT_OPTS};
  if($ENV{JIKESPATH} ne "")
  	{
  	push @ANT_OPTS, "-Djikes.class.path=$ENV{JIKESPATH}";
  	}
  
  #construct arguments to java
  
  my @ARGS;
  push @ARGS, "-classpath", "$localpath", "-Dant.home=$HOME";
  push @ARGS, @ANT_OPTS;
  push @ARGS, "org.apache.tools.ant.Main";
  push @ARGS, @ARGV;
  
  print "\n $JAVACMD @ARGS\n\n" if ($debug);
  system $JAVACMD, @ARGS;
  
  
  
  
  

Mime
View raw message