From dev-return-50123-apmail-ant-dev-archive=ant.apache.org@ant.apache.org Mon Sep 01 10:14:49 2003 Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 53378 invoked from network); 1 Sep 2003 10:14:49 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Sep 2003 10:14:49 -0000 Received: (qmail 40393 invoked by uid 500); 1 Sep 2003 10:14:17 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 40255 invoked by uid 500); 1 Sep 2003 10:14:15 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 40236 invoked by uid 500); 1 Sep 2003 10:14:15 -0000 Received: (qmail 40227 invoked from network); 1 Sep 2003 10:14:15 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 1 Sep 2003 10:14:15 -0000 Received: (qmail 53215 invoked by uid 1146); 1 Sep 2003 10:14:26 -0000 Date: 1 Sep 2003 10:14:26 -0000 Message-ID: <20030901101426.53214.qmail@minotaur.apache.org> From: bodewig@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/script runant.pl X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N bodewig 2003/09/01 03:14:26 Modified: src/script runant.pl Log: Sync runant.pl with the other scripts to use new Launcher Revision Changes Path 1.6 +9 -36 ant/src/script/runant.pl Index: runant.pl =================================================================== RCS file: /home/cvs/ant/src/script/runant.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- runant.pl 1 Jun 2002 12:26:42 -0000 1.5 +++ runant.pl 1 Sep 2003 10:14:26 -0000 1.6 @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Copyright (c) 2001-2002 The Apache Software Foundation. All rights +# Copyright (c) 2000-2003 The Apache Software Foundation. All rights # reserved. # ####################################################################### @@ -18,7 +18,7 @@ # the code is not included. # # created: 2000-8-24 -# last modified: 2000-8-24 +# last modified: $Date$ # author: Steve Loughran steve_l@sourceforge.net ####################################################################### # @@ -86,38 +86,11 @@ $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"; - } +if ($localpath eq "") { + $localpath = "$HOME/lib/ant-launcher.jar"; +} else { + $localpath = "$HOME/lib/ant-launcher.jar$s$localpath"; +} #set JVM options and Ant arguments, if any my @ANT_OPTS=split(" ", $ENV{ANT_OPTS}); @@ -131,6 +104,7 @@ #construct arguments to java my @ARGS; +push @ARGS, @ANT_OPTS; if ($onnetware == 1) { # make classpath literally $CLASSPATH; and then the contents of $localpath @@ -143,8 +117,7 @@ push @ARGS, "-classpath", "$localpath"; } push @ARGS, "-Dant.home=$HOME"; -push @ARGS, @ANT_OPTS; -push @ARGS, "org.apache.tools.ant.Main", @ANT_ARGS; +push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS; push @ARGS, @ARGV; print "\n $JAVACMD @ARGS\n\n" if ($debug); --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org