Return-Path:
Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org
Received: (qmail 78519 invoked by uid 500); 17 Oct 2001 00:37:24 -0000
Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm
Precedence: bulk
Reply-To: ant-dev@jakarta.apache.org
list-help:
list-unsubscribe:
list-post:
Delivered-To: mailing list ant-dev@jakarta.apache.org
Received: (qmail 78505 invoked by uid 500); 17 Oct 2001 00:37:23 -0000
Delivered-To: apmail-jakarta-ant-cvs@apache.org
Date: 17 Oct 2001 00:27:35 -0000
Message-ID: <20011017002735.13573.qmail@icarus.apache.org>
From: holtdl@apache.org
To: jakarta-ant-cvs@apache.org
Subject: cvs commit: jakarta-ant/src/script ant ant.bat runant.pl
X-Spam-Rating: 64.125.133.20 1.6.2 0/1000/N
holtdl 01/10/16 17:27:35
Modified: docs/manual running.html
src/script ant ant.bat runant.pl
Log:
Allow for an ANT_ARGS environment variable, for setting things like
using a different logger or including the -find flag.
(runant.pl, also add a check for cygwin for path separator, fix ANT_OPTS.)
Revision Changes Path
1.4 +7 -3 jakarta-ant/docs/manual/running.html
Index: running.html
===================================================================
RCS file: /home/cvs/jakarta-ant/docs/manual/running.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- running.html 2001/08/08 19:34:20 1.3
+++ running.html 2001/10/17 00:27:34 1.4
@@ -106,12 +106,16 @@
set):
- JAVACMD
full path of the Java executable. Use this
+ JAVACMD
- full path of the Java executable. Use this
to invoke a different JVM than JAVA_HOME/bin/java(.exe)
.
- ANT_OPTS
command line arguments that should be
- passed to the JVM - for example, you can define properties or set
+ ANT_OPTS
- command-line arguments that should be
+ passed to the JVM. For example, you can define properties or set
the maximum Java heap size here.
+
+ ANT_ARGS
- Ant command-line arguments. For example,
+ set ANT_ARGS
to point to a different logger and to
+ include the -find
flag.
Running Ant by Hand
1.8 +1 -1 jakarta-ant/src/script/ant
Index: ant
===================================================================
RCS file: /home/cvs/jakarta-ant/src/script/ant,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ant 2001/07/07 16:29:49 1.7
+++ ant 2001/10/17 00:27:34 1.8
@@ -131,4 +131,4 @@
LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
fi
-$JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main "$@"
+$JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main $ANT_ARGS "$@"
1.14 +2 -2 jakarta-ant/src/script/ant.bat
Index: ant.bat
===================================================================
RCS file: /home/cvs/jakarta-ant/src/script/ant.bat,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- ant.bat 2001/07/22 09:56:23 1.13
+++ ant.bat 2001/10/17 00:27:34 1.14
@@ -90,11 +90,11 @@
if not "%JIKESPATH%" == "" goto runAntWithJikes
:runAnt
-"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
+"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_ARGS% %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%
+"%_JAVACMD%" -classpath "%LOCALCLASSPATH%" -Dant.home="%ANT_HOME%" -Djikes.class.path="%JIKESPATH%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_ARGS% %ANT_CMD_LINE_ARGS%
:end
set LOCALCLASSPATH=
1.3 +6 -4 jakarta-ant/src/script/runant.pl
Index: runant.pl
===================================================================
RCS file: /home/cvs/jakarta-ant/src/script/runant.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- runant.pl 2001/03/16 10:17:30 1.2
+++ runant.pl 2001/10/17 00:27:34 1.3
@@ -55,7 +55,7 @@
#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"))
+if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin"))
{
$s=";";
}
@@ -101,19 +101,21 @@
"to the installation directory of java\n";
}
+#set JVM options and Ant arguments, if any
+my @ANT_OPTS=split(" ", $ENV{ANT_OPTS});
+my @ANT_ARGS=split(" ", $ENV{ANT_ARGS});
+
#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, "org.apache.tools.ant.Main", @ANT_ARGS;
push @ARGS, @ARGV;
print "\n $JAVACMD @ARGS\n\n" if ($debug);