donaldp 01/02/23 20:24:49
Added: tools/bin ant ant.bat antRun antRun.bat lcp.bat
tools/lib ant.jar
Log:
Added in ant
Revision Changes Path
1.1 jakarta-avalon-phoenix/tools/bin/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
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-avalon-phoenix/tools/bin/ant.bat
Index: ant.bat
===================================================================
@echo off
if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
if not "%OS%"=="Windows_NT" goto win9xStart
:winNTStart
@setlocal
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%a==a set ANT_HOME=%DEFAULT_ANT_HOME%
set DEFAULT_ANT_HOME=
rem On NT/2K grab all arguments at once
set ANT_CMD_LINE_ARGS=%*
goto doneStart
:win9xStart
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 %1a==a goto doneStart
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs
:doneStart
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip 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"
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
set LOCALCLASSPATH=
set ANT_CMD_LINE_ARGS=
if not "%OS%"=="Windows_NT" goto mainEnd
:winNTend
@endlocal
:mainEnd
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
1.1 jakarta-avalon-phoenix/tools/bin/antRun
Index: antRun
===================================================================
#! /bin/sh
# Args: DIR command
cd "$1"
CMD="$2"
shift
shift
exec $CMD "$@"
1.1 jakarta-avalon-phoenix/tools/bin/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-avalon-phoenix/tools/bin/lcp.bat
Index: lcp.bat
===================================================================
set LOCALCLASSPATH=%1;%LOCALCLASSPATH%
1.1 jakarta-avalon-phoenix/tools/lib/ant.jar
<<Binary file>>