Browse Source

Revert build process to old style for 1.3 release

Rewrote build.xml using most of the ideas from the new build process


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268542 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
90380952be
5 changed files with 234 additions and 339 deletions
  1. +22
    -12
      bootstrap.bat
  2. +40
    -42
      bootstrap.sh
  3. +14
    -40
      build.bat
  4. +9
    -52
      build.sh
  5. +149
    -193
      build.xml

+ 22
- 12
bootstrap.bat View File

@@ -18,29 +18,34 @@ if "" == "%JAVAC%" set JAVAC=%JAVA_HOME%\bin\javac
echo.
echo ... Bootstrapping Ant Distribution

SET CLASSDIR=build\classes
if exist lib\ant.jar erase lib\ant.jar
if exist lib\optional.jar erase lib\optional.jar

SET LOCALCLASSPATH=lib\parser.jar;lib\jaxp.jar

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

set TOOLS=src\main\org\apache\tools
set CLASSDIR=classes

SET CLASSPATH=%LOCALCLASSPATH%;%CLASSDIR%;src\main;

echo JAVA_HOME=%JAVA_HOME%
echo JAVA=%JAVA%
echo JAVAC=%JAVAC%
echo CLASSPATH=%LOCALCLASSPATH%
echo CLASSPATH=%CLASSPATH%

if "%OS%" == "Windows_NT" if exist build rmdir/s/q build
if not "%OS%" == "Windows_NT" deltree/y build
if "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul rmdir/s/q %CLASSDIR%
if not "%OS%" == "Windows_NT" if exist %CLASSDIR%\nul deltree/y %CLASSDIR%

mkdir %CLASSDIR%
mkdir build
mkdir build\classes

echo.
echo ... Compiling Ant Classes

SET TOOLS=src\main\org\apache\tools

%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
%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

echo.
echo ... Copying Required Files
@@ -51,8 +56,15 @@ copy %TOOLS%\ant\types\*.properties %CLASSDIR%\org\apache\tools\ant\types
echo.
echo ... Building Ant Distribution

SET CLASSPATH=%LOCALCLASSPATH%;build\classes
call build.bat %1 %2 %3 %4 %5 %6 %7 %8
xcopy /s/q %CLASSDIR% build

%JAVA% %ANT_OPTS% org.apache.tools.ant.Main bootstrap

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%

echo.
echo ... Done Bootstrapping Ant Distribution
@@ -64,9 +76,7 @@ set ANT_HOME=%OLDANTHOME%
set OLDJAVA=
set OLDJAVAC=
set OLDCLASSPATH=
set CLASSPATH=
set LOCALCLASSPATH=
set OLDANTHOME=
set TOOLS=
SET CLASSDIR=


+ 40
- 42
bootstrap.sh View File

@@ -1,35 +1,17 @@
#!/bin/bash

# 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
#!/bin/sh

if [ "$CLASSPATH" != "" ] ; then
LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
fi
# You will need to specify JAVA_HOME if compiling with 1.2 or later.

if [ "$JAVA_HOME" != "" ] ; then
if test -f $JAVA_HOME/lib/tools.jar ; then
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
if [ -f $JAVA_HOME/lib/tools.jar ] ; then
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar
fi
if test -f $JAVA_HOME/lib/classes.zip ; then
LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
if [ -f "$JAVA_HOME/lib/classes.zip" ] ; then
CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip
fi
else
echo "Warning: JAVA_HOME environment variable is not set."
echo "Warning: JAVA_HOME environment variable 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."
@@ -41,28 +23,44 @@ if [ ! -x "$JAVA_HOME/bin/java" ] ; then
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

rm -rf build
if [ -f "lib/ant.jar" ] ; then
rm lib/ant.jar
fi
if [ -f "lib/optional.jar" ] ; then
rm lib/optional.jar
fi

CLASSPATH=lib/parser.jar:lib/jaxp.jar:${CLASSPATH}

TOOLS=src/main/org/apache/tools
CLASSDIR=build/classes
CLASSDIR=classes

mkdir -p build
mkdir -p ${CLASSDIR}
CLASSPATH=${CLASSDIR}:src/main:${CLASSPATH}

echo ... Compiling Ant Classes
# convert the unix path to windows
if [ "$OSTYPE" = "cygwin32" ] || [ "$OSTYPE" = "cygwin" ] ; then
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi

export CLASSPATH=$LOCALCLASSPATH:src/main
export CLASSPATH

# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi
mkdir -p ${CLASSDIR}

echo ... Compiling Ant Classes

${JAVAC} -d ${CLASSDIR} ${TOOLS}/tar/*.java \
${TOOLS}/ant/util/regexp/RegexpMatcher.java \
@@ -79,13 +77,13 @@ cp src/main/org/apache/tools/ant/types/defaults.properties \

echo ... Building Ant Distribution

export CLASSPATH=$LOCALCLASSPATH:build/classes
${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main \
-buildfile build.xml clean main bootstrap

# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
fi
echo ... Cleaning Up Build Directories

chmod +x bin/ant bin/antRun

${JAVA_HOME}/bin/java -classpath ${CLASSPATH} org.apache.tools.ant.Main $*
rm -rf ${CLASSDIR}

echo ... Done Bootstrapping Ant Distribution

+ 14
- 40
build.bat View File

@@ -1,45 +1,19 @@
@echo off

set _CP=%CLASSPATH%

if exist build\classes\org\apache\tools\ant\Main.class goto doBuild

call bootstrap.bat %1 %2 %3 %4 %5 %6 %7 %8

:doBuild

echo ----------------
echo Ant Build System
echo ----------------

rem exit

set LOCALCLASSPATH=%CLASSPATH%;lib\optional\junit.jar;build\classes
for %%i in (lib\*.jar) do call src\script\lcp.bat %%i

if "%JAVA_HOME%" == "" goto noJavaHome
set _JAVACMD=%JAVACMD%
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.
set REAL_ANT_HOME=%ANT_HOME%
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

:runAnt
set NEW_ANT_HOME=%ANT_HOME%
if "%ANT_HOME%" == "" set NEW_ANT_HOME=dist
set CLASSPATH=%LOCALCLASSPATH%
set LOCALCLASSPATH=
%_JAVACMD% -classpath %CLASSPATH% %ANT_OPTS% org.apache.tools.ant.Main "-Dant.home=%NEW_ANT_HOME%" -logger org.apache.tools.ant.NoBannerLogger -emacs %1 %2 %3 %4 %5 %6 %7 %8
if not "%REAL_ANT_HOME%" == "" 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="%REAL_ANT_HOME%" %1 %2 %3 %4 %5 %6 %7 %8 %9

set CLASSPATH=%_CP%
set NEW_ANT_HOME=
set _JAVACMD=
rem clean up
:cleanup
set ANT_HOME=%REAL_ANT_HOME%
set REAL_ANT_HOME=

+ 9
- 52
build.sh View File

@@ -1,59 +1,16 @@
#!/bin/sh

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 ' ' ':'`
LOCALCLASSPATH=$LOCALCLASSPATH:build/classes:lib/optional/junit.jar

if [ "$CLASSPATH" != "" ] ; then
LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
fi
REALANTHOME=$ANT_HOME
ANT_HOME=.
export ANT_HOME

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 [ ! -x "$JAVA_HOME/bin/java" ] ; then
echo "Error: JAVA_HOME is not defined correctly."
echo " We cannot execute JAVA_HOME/bin/java"
exit
fi
if test ! -f lib/ant.jar -o ! -x bin/ant -o ! -x bin/antRun ; then
./bootstrap.sh
fi

# For Cygwin, switch paths to Windows format before running javac
if $cygwin; then
LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
if [ "$REALANTHOME" != "" ] ; then
ANT_INSTALL="-Dant.install $REALANTHOME"
fi

NEW_ANT_HOME=$ANT_HOME
if [ ! "$NEW_ANT_HOME" ] ; then
NEW_ANT_HOME=dist
fi
bin/ant $ANT_INSTALL $*

${JAVA_HOME}/bin/java -classpath $LOCALCLASSPATH org.apache.tools.ant.Main -Dant.home=$NEW_ANT_HOME -logger org.apache.tools.ant.NoBannerLogger -emacs $*

+ 149
- 193
build.xml View File

@@ -16,48 +16,41 @@
<property name="name" value="ant"/>
<property name="version" value="1.3alpha"/>

<property name="debug" value="false" />
<property name="deprecation" value="false" />
<property name="optimize" value="true" />
<property name="junit.fork" value="false" />

<!--
===================================================================
Set the properties for source directories
Set the properties related to the source tree
===================================================================
-->
<property name="src.dir" value="src"/>
<property name="manifest.dir" value="${src.dir}/manifest"/>
<property name="java.dir" value="${src.dir}/main"/>
<property name="script.dir" value="${src.dir}/script"/>
<property name="lib.dir" value="lib"/>
<property name="docs.dir" value="docs"/>
<property name="tests.dir" value="src/testcases"/>
<property name="ant.package" value="org/apache/tools/ant"/>
<property name="optional.package" value="${ant.package}/taskdefs/optional"/>

<property name="manifest" value="src/etc/manifest"/>


<!--
===================================================================
Set the properties for intermediate directory
Set the properties for the build area
===================================================================
-->
<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.lib" value="${build.dir}/lib"/>
<property name="build.javadocs" value="${build.dir}/javadocs"/>
<property name="build.docs" value="${build.dir}/docs"/>
<property name="build.tests" value="${build.dir}/testcases"/>

<!--
===================================================================
Set the properties related dist target
===================================================================
-->
<property name="dist.name" value="jakarta-${name}-${version}"/>
<property name="dist.base" value="."/>

<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">
@@ -66,41 +59,15 @@
<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"/>

<property name="constants.file" value="org/apache/tools/ant/Constants.java" />

<!--
===================================================================
Set some the defaults the user can override in .ant.properties
===================================================================
-->
<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" />

<!--
===================================================================
Main target
===================================================================
-->
<target name="main" depends="dist-lite" />

<!--
===================================================================
Set up dist properties
Set up properties for the distribution area
===================================================================
-->
<target name="setup-properties">
<property name="dist.name" value="jakarta-${name}-${version}"/>
<property name="dist.base" value="distribution"/>

<target name="setup-distproperties">

<property name="dist.dir" value="dist"/>
<property name="dist.bin" value="${dist.dir}/bin"/>
@@ -119,7 +86,7 @@
Check to see what optional dependencies are available
===================================================================
-->
<target name="check_for_optional_packages" depends="setup-properties">
<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"
@@ -175,55 +142,24 @@
classpathref="classpath"/>
</target>

<!--
===================================================================
Prepares the build
===================================================================
-->
<target name="prepare" depends="check_for_optional_packages">
<!-- =================================================================== -->
<!-- Prepares the build directory -->
<!-- =================================================================== -->
<target name="prepare">
<tstamp />
</target>

<property name="version" value="${version}"/>
<property name="date" value="${TODAY}"/>

<target name="build" depends="prepare, check_for_optional_packages">
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.src}"/>
<mkdir dir="${build.lib}"/>
<mkdir dir="${build.classes}"/>

<copy todir="${build.src}">
<fileset dir="${java.dir}">
<include name="${constants.file}" />
<include name="org/apache/tools/ant/defaultManifest.mf" />
</fileset>
</copy>

<replace file="${build.src}/${constants.file}" token="@VERSION@" value="${version}"/>
<replace file="${build.src}/${constants.file}" token="@DATE@" value="${date}"/>
<mkdir dir="${build.lib}"/>
<replace file="${build.src}/org/apache/tools/ant/defaultManifest.mf"
token="@VERSION@"
value="${version}"/>

</target>

<!--
===================================================================
Compiles the source code
===================================================================
-->
<target name="compile" depends="prepare">

<javac srcdir="${java.dir}"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}" >
<classpath refid="classpath" />

<src path="${build.src}" />

<exclude name="${constants.file}" />
<exclude name="${ant.package}/util/regexp/JakartaRegexpMatcher.java"
unless="jakarta.regexp.present" />
<exclude name="${ant.package}/util/regexp/JakartaOroMatcher.java"
@@ -249,31 +185,43 @@
<exclude name="${optional.package}/perforce/*.java" unless="jakarta.oro.present" />
<exclude name="${optional.package}/sound/*.java" unless="jmf.present" />
</javac>
<copy todir="${build.classes}">
<fileset dir="${java.dir}">
<include name="**/*.properties" />
</fileset>
</copy>

<copy file="${build.src}/${ant.package}/defaultManifest.mf"
todir="${build.classes}/${ant.package}" />
<copy file="${java.dir}/${ant.package}/taskdefs/defaults.properties"
todir="${build.classes}/${ant.package}/taskdefs" />

<copy file="${java.dir}/${ant.package}/types/defaults.properties"
todir="${build.classes}/${ant.package}/types" />

<filter token="VERSION" value="${version}" />
<filter token="DATE" value="${TODAY}" />
<filter token="TIME" value="${TSTAMP}" />
<copy todir="${build.classes}"
overwrite="true"
filtering="on">
<fileset dir="${java.dir}">
<include name="**/version.txt" />
<include name="**/defaultManifest.mf" />
</fileset>
</copy>
</target>

<!--
===================================================================
Creates the lib directory including the ant jars, ant.jar and
optional.jar
===================================================================
-->
<target name="jars" depends="compile">
<target name="jars" depends="build">

<jar jarfile="${build.lib}/${name}.jar" basedir="${build.classes}" manifest="${manifest}">
<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}">
<jar jarfile="${build.lib}/optional.jar"
basedir="${build.classes}"
manifest="${manifest}">
<include name="org/apache/tools/ant/taskdefs/optional/**" />
</jar>

@@ -281,10 +229,10 @@

<!--
===================================================================
Create the test build
Create the essential distribution
===================================================================
-->
<target name="dist-lite" depends="jars">
<target name="dist-lite" depends="jars, setup-distproperties">

<mkdir dir="${dist.dir}"/>
<mkdir dir="${dist.bin}"/>
@@ -309,31 +257,11 @@
<fixcrlf srcdir="${dist.bin}" cr="add" includes="*.bat" />
<fixcrlf srcdir="${dist.bin}" cr="remove" includes="*.sh" />
<fixcrlf srcdir="${dist.bin}" cr="remove" includes="ant" />

</target>

<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
<target name="javadocs" depends="prepare" description="Creates the API documentation" unless="foo">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="org.apache.*"
sourcepath="${java.dir}"
destdir="${build.javadocs}"
author="true"
version="true"
windowtitle="${Name} API"
doctitle="${Name}"
bottom="Copyright &#169; 2000 Apache Software Foundation. All Rights Reserved.">
<group title="Ant Core" packages="org.apache.tools.ant*" />
<group title="Core Tasks" packages="org.apache.tools.ant.taskdefs*" />
<group title="Optional Tasks" packages="org.apache.tools.ant.taskdefs.optional*" />
</javadoc>
</target>

<!--
===================================================================
Create the distribution
Create the complete distribution
===================================================================
-->
<target name="dist" depends="dist-lite,javadocs">
@@ -344,6 +272,8 @@
<fileset dir="${lib.dir}">
<include name="*.jar" />
<include name="*.zip" />
<exclude name="ant.jar"/>
<exclude name="optional.jar"/>
</fileset>
</copy>

@@ -351,11 +281,9 @@
<fileset dir="${docs.dir}"/>
</copy>

<!--
<copy todir="${dist.javadocs}">
<fileset dir="${build.javadocs}"/>
</copy>
-->

<copy todir="${dist.dir}">
<fileset dir=".">
@@ -370,31 +298,28 @@

</target>

<target name="bin-dist" depends="dist">
<zip zipfile="${dist.base}/${dist.name}-bin.zip"
basedir="${dist.dir}/.."
includes="${dist.dir}/**"/>
<tar tarfile="${dist.base}/${dist.name}-bin.tar"
basedir="${dist.dir}/.."
includes="${dist.dir}/**"/>
<gzip zipfile="${dist.base}/${dist.name}-bin.tar.gz"
src="${dist.base}/${dist.name}-bin.tar"/>
<delete file="${dist.base}/${dist.name}-bin.tar"/>
<!--
===================================================================
Target to create bootstrap libraries
===================================================================
-->
<target name="bootstrap">
<antcall target="dist-lite">
<param name="dist.dir" value="." />
</antcall>
</target>


<!--
===================================================================
Create the source distribution
===================================================================
-->
<target name="src-dist" depends="setup-properties">
<target name="src-dist" depends="setup-distproperties">

<mkdir dir="${src.dist.dir}" />
<!--
<mkdir dir="${src.dist.lib}" />
<mkdir dir="${src.dist.src}" />
<mkdir dir="${src.dist.docs}" />
-->
<copy todir="${src.dist.lib}">
<fileset dir="${lib.dir}">
<include name="*.jar" />
@@ -433,47 +358,51 @@

<fixcrlf srcdir="${src.dist.src}" includes="**/*.java" cr="remove"/>
<zip zipfile="${dist.base}/${dist.name}-src.zip"
basedir="${src.dist.dir}/.."
includes="${src.dist.dir}/**"/>
<!--
<tar tarfile="${dist.base}/${dist.name}-src.tar"
basedir="${src.dist.dir}/.."
includes="${src.dist.dir}/**"/>
<gzip zipfile="${dist.base}/${dist.name}-src.tar.gz"
src="${dist.base}/${dist.name}-src.tar"/>
<delete file="${dist.base}/${dist.name}-src.tar"/>
-->
<delete dir="${src.dist.dir}" />
</target>

<!--
===================================================================
Completely build all dists
Create the binary distribution
===================================================================
-->
<target name="full-dist">
<antcall target="src-dist">
<param name="src.dist.dir" value="${dist.name}" />
</antcall>
<target name="distribution">
<mkdir dir="${dist.base}"/>

<antcall target="bin-dist">
<antcall target="dist">
<param name="dist.dir" value="${dist.name}" />
</antcall>
<zip zipfile="${dist.base}/${dist.name}-bin.zip"
basedir="${dist.name}/.."
includes="${dist.name}/**"
excludes="${dist.name}/lib/optional.jar"/>
<!--
<tar tarfile="${dist.base}/${dist.name}-bin.tar"
basedir="${dist.name}/.."
includes="${dist.name}/**"/
excludes="${dist.name}/lib/optional.jar">
<gzip zipfile="${dist.base}/${dist.name}-bin.tar.gz"
src="${dist.base}/${dist.name}-bin.tar"/>
-->
<copy file="${dist.name}/lib/optional.jar" tofile="${dist.base}/${dist.name}-optional.jar"/>
<delete dir="${dist.name}" />
</target>

<target name="install">
<antcall target="dist">
<param name="dist.dir" value="${ant.home}" />
</antcall>
</target>

<target name="install-lite">
<antcall target="dist-lite">
<param name="dist.dir" value="${ant.home}" />
<antcall target="src-dist">
<param name="src.dist.dir" value="${dist.name}" />
</antcall>
<zip zipfile="${dist.base}/${dist.name}-src.zip"
basedir="${dist.name}/.."
includes="${dist.name}/**"/>
<!--
<tar tarfile="${dist.base}/${dist.name}-src.tar"
basedir="${src.dist.dir}/.."
includes="${src.dist.dir}/**"/>
<gzip zipfile="${dist.base}/${dist.name}-src.tar.gz"
src="${dist.base}/${dist.name}-src.tar"/>
-->
<delete dir="${dist.name}" />
</target>

<!--
===================================================================
Cleans up build and distribution directories
@@ -489,20 +418,57 @@

<!--
===================================================================
Cleans absolutely everything up
Installs ant
===================================================================
-->
<target name="install" if="ant.install">
<antcall target="dist">
<param name="dist.dir" value="${ant.install}" />
</antcall>
</target>

<target name="install-lite" if="ant.install">
<antcall target="dist-lite">
<param name="dist.dir" value="${ant.install}" />
</antcall>
</target>

<!--
===================================================================
Creates the API documentation
===================================================================
-->
<target name="real-clean" depends="clean">
<delete file="${dist.name}.tar.gz" />
<delete file="${dist.name}.zip" />
<target name="javadoc_check">
<uptodate property="javadoc.notrequired" targetfile="${build.javadocs}/packages.html" >
<srcfiles dir= "${java.dir}" includes="**/*.java"/>
</uptodate>
</target>

<target name="javadocs" depends="prepare, javadoc_check"
unless="javadoc.notrequired"
description="Creates the API documentation">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="org.apache.*"
sourcepath="${java.dir}"
destdir="${build.javadocs}"
author="true"
version="true"
windowtitle="${Name} API"
doctitle="${Name}"
bottom="Copyright &#169; 2000 Apache Software Foundation. All Rights Reserved.">
<group title="Ant Core" packages="org.apache.tools.ant*" />
<group title="Core Tasks" packages="org.apache.tools.ant.taskdefs*" />
<group title="Optional Tasks" packages="org.apache.tools.ant.taskdefs.optional*" />
</javadoc>
</target>
<!--
===================================================================
Compile testcases
===================================================================
-->
<target name="compile-tests" depends="compile" if="junit.present">
<target name="compile-tests" depends="build" if="junit.present">
<mkdir dir="${build.tests}"/>

<javac srcdir="${tests.dir}"
@@ -520,23 +486,12 @@
</javac>
</target>

<!--
===================================================================
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">
<target name="run-tests" depends="compile-tests" if="junit.present">

<junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
<jvmarg value="-classic"/>
@@ -576,7 +531,7 @@
<delete file="${tests.dir}/taskdefs/tmp.jar" />
</target>

<target name="run-single-test" if="testcase" depends="compile-tests, define-junit">
<target name="run-single-test" if="testcase" depends="compile-tests">

<junit printsummary="no" haltonfailure="yes" fork="${junit.fork}">
<jvmarg value="-classic"/>
@@ -586,5 +541,6 @@
</junit>
</target>

</project>
<target name="main" depends="dist-lite"/>

</project>

Loading…
Cancel
Save