You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2002/05/02 17:41:46 UTC

cvs commit: jakarta-ant/src/script runant.pl

bodewig     02/05/02 08:41:46

  Modified:    .        Tag: ANT_15_BRANCH WHATSNEW
               src/script Tag: ANT_15_BRANCH runant.pl
  Log:
  Support Netware in runant.pl
  
  PR: 8702
  Submitted by:	Jeff Tulley <jt...@novell.com>
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.263.2.1 +10 -2     jakarta-ant/WHATSNEW
  
  Index: WHATSNEW
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
  retrieving revision 1.263
  retrieving revision 1.263.2.1
  diff -u -r1.263 -r1.263.2.1
  --- WHATSNEW	30 Apr 2002 22:38:35 -0000	1.263
  +++ WHATSNEW	2 May 2002 15:41:46 -0000	1.263.2.1
  @@ -1,5 +1,13 @@
  -Changes from Ant 1.4.1 to current CVS version
  -==============================================
  +Changes from Ant 1.5beta1 to current CVS version
  +================================================
  +
  +Fixed bugs:
  +-----------
  +
  +* runant.pl now supports Netware.
  +
  +Changes from Ant 1.4.1 to 1.5beta1
  +==================================
   
   Changes that could break older environments:
   --------------------------------------------
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.4.2.1   +29 -4     jakarta-ant/src/script/runant.pl
  
  Index: runant.pl
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/script/runant.pl,v
  retrieving revision 1.4
  retrieving revision 1.4.2.1
  diff -u -r1.4 -r1.4.2.1
  --- runant.pl	10 Jan 2002 14:18:42 -0000	1.4
  +++ runant.pl	2 May 2002 15:41:46 -0000	1.4.2.1
  @@ -1,6 +1,6 @@
   #!/usr/bin/perl
   #
  -#   Copyright (c) 2001 The Apache Software Foundation.  All rights
  +#   Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
   #   reserved.
   #
   #######################################################################
  @@ -55,11 +55,18 @@
   my $JAVACMD = $ENV{JAVACMD};
   $JAVACMD = "java" if $JAVACMD eq "";
   
  +my $onnetware = 0;
  +if ($^O eq "NetWare")
  +{
  +  $onnetware = 1;
  +}
  +
   #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.
  +#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed.
   my $s=":";
  -if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin"))
  +if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin") ||
  +   ($onnetware == 1))
           {
           $s=";";
           }
  @@ -71,6 +78,13 @@
           print "warning: no initial classpath\n" if ($debug);
           $localpath="";
           }
  +if ($onnetware == 1)
  +{
  +# avoid building a command line bigger than 512 characters - make localpath
  +# only include the "extra" stuff, and add in the system classpath as an expanded
  +# variable. 
  +  $localpath="";
  +} 
   
   #add jar files. I am sure there is a perl one liner to do this.
   my $jarpattern="$HOME/lib/*.jar";
  @@ -117,7 +131,18 @@
   
   #construct arguments to java
   my @ARGS;
  -push @ARGS, "-classpath", "$localpath", "-Dant.home=$HOME";
  +if ($onnetware == 1)
  +{
  +# make classpath literally $CLASSPATH; and then the contents of $localpath
  +# this is to avoid pushing us over the 512 character limit
  +# even skip the ; - that is already in $localpath
  +  push @ARGS, "-classpath", "\$CLASSPATH$localpath";
  +}
  +else
  +{
  +  push @ARGS, "-classpath", "$localpath";
  +}
  +push @ARGS, "-Dant.home=$HOME";
   push @ARGS, @ANT_OPTS;
   push @ARGS, "org.apache.tools.ant.Main", @ANT_ARGS;
   push @ARGS, @ARGV;
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>