cvs commit: ant/src/script ant

2005-03-15 Thread bodewig
bodewig 2005/03/15 07:29:37

  Modified:src/script Tag: ANT_16_BRANCH ant
  Log:
  Remove unused code, PR 34018
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.38.2.8  +0 -9  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.38.2.7
  retrieving revision 1.38.2.8
  diff -u -r1.38.2.7 -r1.38.2.8
  --- ant   6 Sep 2004 09:18:50 -   1.38.2.7
  +++ ant   15 Mar 2005 15:29:37 -  1.38.2.8
  @@ -87,15 +87,6 @@
   esac
   
   if [ -z $ANT_HOME -o ! -d $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`
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2005-03-15 Thread bodewig
bodewig 2005/03/15 07:29:47

  Modified:src/script ant
  Log:
  Remove unused code, PR 34018
  
  Revision  ChangesPath
  1.51  +0 -9  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- ant   6 Sep 2004 09:14:41 -   1.50
  +++ ant   15 Mar 2005 15:29:47 -  1.51
  @@ -87,15 +87,6 @@
   esac
   
   if [ -z $ANT_HOME -o ! -d $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`
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2005-03-15 Thread jkf
jkf 2005/03/15 12:52:27

  Modified:src/script ant
  Log:
  PR: 31245
  cygwin part to handle both unix and windows style paths correctly
  
  Revision  ChangesPath
  1.52  +8 -2  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- ant   15 Mar 2005 15:29:47 -  1.51
  +++ ant   15 Mar 2005 20:52:27 -  1.52
  @@ -214,6 +214,10 @@
   fi
   
   # For Cygwin, switch paths to appropriate format before running java
  +# For PATHs convert to unix format first, then to windows format to ensure
  +# both formats are supported. Probably this will fail on directories with ;
  +# in the name in the path. Let's assume that paths containing ; are more
  +# rare than windows style paths on cygwin.
   if $cygwin; then
 if [ $OS = Windows_NT ]  cygpath -m ./dev/null 2/dev/null ; then
   format=mixed
  @@ -223,9 +227,11 @@
 ANT_HOME=`cygpath --$format $ANT_HOME`
 ANT_LIB=`cygpath --$format $ANT_LIB`
 JAVA_HOME=`cygpath --$format $JAVA_HOME`
  -  LOCALCLASSPATH=`cygpath --path --$format $LOCALCLASSPATH`
  +  LCP_TEMP=`cygpath --path --unix $LOCALCLASSPATH`
  +  LOCALCLASSPATH=`cygpath --path --$format $LCP_TEMP`
 if [ -n $CLASSPATH ] ; then
  -CLASSPATH=`cygpath --path --$format $CLASSPATH`
  +CP_TEMP=`cygpath --path --unix $CLASSPATH`
  +CLASSPATH=`cygpath --path --$format $CP_TEMP`
 fi
 CYGHOME=`cygpath --$format $HOME`
   fi
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2005-03-15 Thread jkf
jkf 2005/03/15 12:55:05

  Modified:src/script Tag: ANT_16_BRANCH ant
  Log:
  PR: 31245
  cygwin part to handle both unix and windows style paths correctly
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.38.2.9  +9 -3  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.38.2.8
  retrieving revision 1.38.2.9
  diff -u -r1.38.2.8 -r1.38.2.9
  --- ant   15 Mar 2005 15:29:37 -  1.38.2.8
  +++ ant   15 Mar 2005 20:55:05 -  1.38.2.9
  @@ -1,6 +1,6 @@
   #! /bin/sh
   
  -#   Copyright 2001-2004 The Apache Software Foundation
  +#   Copyright 2001-2005 The Apache Software Foundation
   #
   #   Licensed under the Apache License, Version 2.0 (the License);
   #   you may not use this file except in compliance with the License.
  @@ -214,6 +214,10 @@
   fi
   
   # For Cygwin, switch paths to appropriate format before running java
  +# For PATHs convert to unix format first, then to windows format to ensure
  +# both formats are supported. Probably this will fail on directories with ;
  +# in the name in the path. Let's assume that paths containing ; are more
  +# rare than windows style paths on cygwin.
   if $cygwin; then
 if [ $OS = Windows_NT ]  cygpath -m ./dev/null 2/dev/null ; then
   format=mixed
  @@ -223,9 +227,11 @@
 ANT_HOME=`cygpath --$format $ANT_HOME`
 ANT_LIB=`cygpath --$format $ANT_LIB`
 JAVA_HOME=`cygpath --$format $JAVA_HOME`
  -  LOCALCLASSPATH=`cygpath --path --$format $LOCALCLASSPATH`
  +  LCP_TEMP=`cygpath --path --unix $LOCALCLASSPATH`
  +  LOCALCLASSPATH=`cygpath --path --$format $LCP_TEMP`
 if [ -n $CLASSPATH ] ; then
  -CLASSPATH=`cygpath --path --$format $CLASSPATH`
  +CP_TEMP=`cygpath --path --unix $CLASSPATH`
  +CLASSPATH=`cygpath --path --$format $CP_TEMP`
 fi
 CYGHOME=`cygpath --$format $HOME`
   fi
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2005-03-15 Thread jkf
jkf 2005/03/15 12:55:28

  Modified:src/script ant
  Log:
  cright
  
  Revision  ChangesPath
  1.53  +1 -1  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- ant   15 Mar 2005 20:52:27 -  1.52
  +++ ant   15 Mar 2005 20:55:27 -  1.53
  @@ -1,6 +1,6 @@
   #! /bin/sh
   
  -#   Copyright 2001-2004 The Apache Software Foundation
  +#   Copyright 2001-2005 The Apache Software Foundation
   #
   #   Licensed under the Apache License, Version 2.0 (the License);
   #   you may not use this file except in compliance with the License.
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2004-06-11 Thread mbenson
mbenson 2004/06/11 14:20:37

  Modified:src/script Tag: ANT_16_BRANCH ant
  Log:
  Sync from HEAD.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.38.2.6  +169 -40   ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.38.2.5
  retrieving revision 1.38.2.6
  diff -u -r1.38.2.5 -r1.38.2.6
  --- ant   9 Feb 2004 22:12:46 -   1.38.2.5
  +++ ant   11 Jun 2004 21:20:36 -  1.38.2.6
  @@ -14,23 +14,64 @@
   #   See the License for the specific language governing permissions and
   #   limitations under the License.
   
  -# load system-wide ant configuration
  -if [ -f /etc/ant.conf ] ; then
  -  . /etc/ant.conf
  -fi
  +# Extract launch and ant arguments, (see details below).
  +ant_exec_args=
  +no_config=false
  +use_jikes_default=false
  +ant_exec_debug=false
  +show_help=false
  +for arg in $@ ; do
  +  if [ $arg = --noconfig ] ; then
  +no_config=true
  +  elif [ $arg = --usejikes ] ; then
  +use_jikes_default=true
  +  elif [ $arg = --execdebug ] ; then
  +ant_exec_debug=true
  +  elif [ my$arg = my--h  -o my$arg = my--help  ] ; then
  +show_help=true
  +ant_exec_args=$ant_exec_args -h
  +  else
  +if [  my$arg = my-h  -o  my$arg = my-help ] ; then
  +  show_help=true
  +fi
  +ant_exec_args=$ant_exec_args \$arg\
  +  fi
  +done
   
  -# provide default values for people who don't use RPMs
  -if [ -z $rpm_mode ] ; then
  -  rpm_mode=false;
  -fi
  +# Source/default ant configuration
  +if $no_config ; then
  +  rpm_mode=false
  +  usejikes=$use_jikes_default
  +else
  +  # load system-wide ant configuration
  +  if [ -f /etc/ant.conf ] ; then
  +. /etc/ant.conf
  +  fi
   
  -if [ -z $usejikes ] ; then
  -  usejikes=false;
  +  # load user ant configuration
  +  if [ -f $HOME/.ant/ant.conf ] ; then
  +. $HOME/.ant/ant.conf
  +  fi
  +  if [ -f $HOME/.antrc ] ; then
  +. $HOME/.antrc
  +  fi
  +
  +  # provide default configuration values
  +  if [ -z $rpm_mode ] ; then
  +rpm_mode=false
  +  fi
  +  if [ -z $usejikes ] ; then
  +usejikes=$use_jikes_default
  +  fi
   fi
   
  -# load user ant configuration
  -if [ -f $HOME/.antrc ] ; then
  -  . $HOME/.antrc
  +# Setup Java environment in rpm mode
  +if $rpm_mode ; then
  +  if [ -f /usr/share/java-utils/java-functions ] ; then
  +. /usr/share/java-utils/java-functions
  +set_jvm
  +set_javacmd
  +  fi
   fi
   
   # OS specific support.  $var _must_ be set to either true or false.
  @@ -109,29 +150,60 @@
 exit 1
   fi
   
  -# in rpm_mode get ant/optional/xml parserapi from JAVALIBDIR
  -if $rpm_mode; then
  -  JAVALIBDIR=/usr/share/java
  -  for i in ant ant-optional jaxp_parser xml_apis
  -  do
  -if [ -z $LOCALCLASSPATH ] ; then
  -  LOCALCLASSPATH=$JAVALIBDIR/$i.jar
  -else
  -  LOCALCLASSPATH=$JAVALIBDIR/$i.jar:$LOCALCLASSPATH
  +# Build local classpath using just the launcher in non-rpm mode or
  +# use the Jpackage helper in rpm mode with basic and default jars
  +# specified in the ant.conf configuration. Because the launcher is
  +# used, libraries linked in ANT_HOME will also be include, but this
  +# is discouraged as it is not java-version safe. A user should
  +# request optional jars and their dependencies via the OPT_JAR_LIST
  +# variable
  +if $rpm_mode  [ -f /usr/bin/build-classpath ] ; then
  +  LOCALCLASSPATH=$(/usr/bin/build-classpath ant ant-launcher 
jaxp_parser_impl xml-commons-apis)
  +  # If the user requested to try to add some other jars to the classpath
  +  if [ -n $OPT_JAR_LIST ] ; then
  +_OPTCLASSPATH=$(/usr/bin/build-classpath $OPT_JAR_LIST 2 /dev/null)
  +if [ -n $_OPTCLASSPATH ] ; then 
  +  LOCALCLASSPATH=$LOCALCLASSPATH:$_OPTCLASSPATH
   fi
  -  done
  +  fi
   
  -  # in rpm mode ant/lib is in /usr/share/java/ant
  -  ANT_LIB=${JAVALIBDIR}/ant
  -fi
  +  # Explicitly add javac path to classpath, assume JAVA_HOME set
  +  # properly in rpm mode
  +  if [ -f $JAVA_HOME/lib/tools.jar ] ; then
  +LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
  +  fi
  +  if [ -f $JAVA_HOME/lib/classes.zip ] ; then
  +LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
  +  fi
  +
  +  # if CLASSPATH_OVERRIDE env var is set, LOCALCLASSPATH will be
  +  # user CLASSPATH first and ant-found jars after.
  +  # In that case, the user CLASSPATH will override ant-found jars
  +  #
  +  # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
  +  # with ant-found jars first and user CLASSPATH after
  +  if [ -n $CLASSPATH ] ; then
  +# merge local and specified classpath 
  +if [ -z $LOCALCLASSPATH ] ; then 
  +  LOCALCLASSPATH=$CLASSPATH
  +elif [ -n $CLASSPATH_OVERRIDE ] ; then
  +  LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
  +else
  +  LOCALCLASSPATH=$LOCALCLASSPATH:$CLASSPATH
  

cvs commit: ant/src/script ant

2004-05-06 Thread mbenson
mbenson 2004/05/06 09:42:18

  Modified:src/script ant
  Log:
  Cygwin/UNC ANT_HOME compatibility using mixed paths on NT-family systems.
  
  Revision  ChangesPath
  1.48  +17 -6 ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- ant   2 Mar 2004 21:57:42 -   1.47
  +++ ant   6 May 2004 16:42:18 -   1.48
  @@ -222,13 +222,19 @@
 ANT_OPTS=$ANT_OPTS -Dbuild.compiler=jikes
   fi
   
  -# For Cygwin, switch paths to Windows format before running java
  +# For Cygwin, switch paths to appropriate format before running java
   if $cygwin; then
  -  ANT_HOME=`cygpath --windows $ANT_HOME`
  -  ANT_LIB=`cygpath --windows $ANT_LIB`
  -  JAVA_HOME=`cygpath --windows $JAVA_HOME`
  -  LOCALCLASSPATH=`cygpath --path --windows $LOCALCLASSPATH`
  -  CYGHOME=`cygpath --windows $HOME`
  +  if [ $OS = Windows_NT ] ; then
  +format=mixed
  +  else
  +format=windows
  +  fi
  +  ANT_HOME=`cygpath --$format $ANT_HOME`
  +  ANT_LIB=`cygpath --$format $ANT_LIB`
  +  JAVA_HOME=`cygpath --$format $JAVA_HOME`
  +  LOCALCLASSPATH=`cygpath --path --$format $LOCALCLASSPATH`
  +  CLASSPATH=`cygpath --path --$format $OCALCLASSPATH`
  +  CYGHOME=`cygpath --$format $HOME`
   fi
   
   # Show script help if requested
  @@ -247,6 +253,11 @@
   fi
   # add a second backslash to variables terminated by a backslash under cygwin
   if $cygwin; then
  +  case $ANT_HOME in
  +*\\ )
  +ANT_HOME=$ANT_HOME\\
  +;;
  +  esac
 case $CYGHOME in
   *\\ )
   CYGHOME=$CYGHOME\\
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: ant/src/script ant

2004-05-06 Thread Matt Benson
--- [EMAIL PROTECTED] wrote:
 mbenson 2004/05/06 09:42:18
 
   Modified:src/script ant
   Log:
   Cygwin/UNC ANT_HOME compatibility using mixed
 paths on NT-family systems.
   
   +# For Cygwin, switch paths to appropriate format
 before running java
if $cygwin; then
   +  if [ $OS = Windows_NT ] ; then
   +format=mixed
   +  else
   +format=windows
   +  fi


Can anyone confirm or deny that mixed mode (forward
slashes) will NOT work on 95/98?  Else I'll
double-check later.

-Matt




__
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2004-05-06 Thread mbenson
mbenson 2004/05/06 12:43:20

  Modified:src/script ant
  Log:
  Make sure CLASSPATH is set before attempting to change it;
  make sure --mixed option is available to cygpath before using it.
  
  Revision  ChangesPath
  1.49  +4 -2  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- ant   6 May 2004 16:42:18 -   1.48
  +++ ant   6 May 2004 19:43:19 -   1.49
  @@ -224,7 +224,7 @@
   
   # For Cygwin, switch paths to appropriate format before running java
   if $cygwin; then
  -  if [ $OS = Windows_NT ] ; then
  +  if [ $OS = Windows_NT ]  cygpath -m ./dev/null 2/dev/null ; then
   format=mixed
 else
   format=windows
  @@ -233,7 +233,9 @@
 ANT_LIB=`cygpath --$format $ANT_LIB`
 JAVA_HOME=`cygpath --$format $JAVA_HOME`
 LOCALCLASSPATH=`cygpath --path --$format $LOCALCLASSPATH`
  -  CLASSPATH=`cygpath --path --$format $OCALCLASSPATH`
  +  if [ -n $CLASSPATH ] ; then
  +CLASSPATH=`cygpath --path --$format $CLASSPATH`
  +  fi
 CYGHOME=`cygpath --$format $HOME`
   fi
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: ant/src/script ant

2004-03-03 Thread Stefan Bodewig
On Tue, 2 Mar 2004, Matt Benson [EMAIL PROTECTED] wrote:

 Don't be fooled--this doesn't fix the big UNC problem, just
 addresses a quick typo.

This is in the part I've committed for the jpackage folks, right?

Sorry, I just quickly glanced over it and didn't catch it.  As I don't
use the RPMs myself I more or less trust them to do the right thing
(tm).

Thanks

Stefan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: ant/src/script ant

2004-03-03 Thread Matt Benson
--- Stefan Bodewig [EMAIL PROTECTED] wrote:
 On Tue, 2 Mar 2004, Matt Benson
 [EMAIL PROTECTED] wrote:
 
 This is in the part I've committed for the jpackage
 folks, right?
 
Actually, I think it was from the previous change to
avoid escaping the quote on the command line when
certain paths ended with backslashes.  This gives me a
chance to half-retract what I said about escaping
issues as well, since upon re-reading Antoine's
original message those problems were encountered with
ant.bat and I was using ant under cygwin.  If we're
lucky that puts us back in the Java world to figure
out why Ant doesn't like a UNC ANT_HOME.  :)

-Matt

__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2004-03-02 Thread mbenson
mbenson 2004/03/02 13:57:42

  Modified:src/script ant
  Log:
  Fix typo.
  
  Revision  ChangesPath
  1.47  +1 -1  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- ant   27 Feb 2004 15:40:34 -  1.46
  +++ ant   2 Mar 2004 21:57:42 -   1.47
  @@ -259,7 +259,7 @@
 esac
 case $LOCALCLASSPATH in
   *\\ )
  -LOCALCLASSPATH=LOCALCLASSPATH\\
  +LOCALCLASSPATH=$LOCALCLASSPATH\\
   ;;
 esac
 case $CLASSPATH in
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: ant/src/script ant

2004-03-02 Thread Matt Benson
Don't be fooled--this doesn't fix the big UNC problem,
just addresses a quick typo.

-Matt

--- [EMAIL PROTECTED] wrote:
 mbenson 2004/03/02 13:57:42
 
   Modified:src/script ant
   Log:
   Fix typo.
   
   Revision  ChangesPath
   1.47  +1 -1  ant/src/script/ant
   
   Index: ant
  

===
   RCS file: /home/cvs/ant/src/script/ant,v
   retrieving revision 1.46
   retrieving revision 1.47
   diff -u -r1.46 -r1.47
   --- ant 27 Feb 2004 15:40:34 -  1.46
   +++ ant 2 Mar 2004 21:57:42 -   1.47
   @@ -259,7 +259,7 @@
  esac
  case $LOCALCLASSPATH in
*\\ )
   -LOCALCLASSPATH=LOCALCLASSPATH\\
   +LOCALCLASSPATH=$LOCALCLASSPATH\\
;;
  esac
  case $CLASSPATH in
   
   
   
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2004-02-27 Thread bodewig
bodewig 2004/02/27 07:40:34

  Modified:src/script ant
  Log:
  More tweaks to the RPM specific section, submitted by Randy Watler
  
  Revision  ChangesPath
  1.46  +8 -6  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- ant   11 Feb 2004 08:29:38 -  1.45
  +++ ant   27 Feb 2004 15:40:34 -  1.46
  @@ -182,12 +182,14 @@
 #
 # if CLASSPATH_OVERRIDE is not set, we'll have the normal behaviour
 # with ant-found jars first and user CLASSPATH after
  -  if [ -n $CLASSPATH -a -n $CLASSPATH_OVERRIDE ] ; then
  - # prepend local class path with class path override
  - if [ -z $LOCALCLASSPATH ] ; then 
  -   LOCALCLASSPATH=$CLASSPATH
  - else
  -   LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
  +  if [ -n $CLASSPATH ] ; then
  +# merge local and specified classpath 
  +if [ -z $LOCALCLASSPATH ] ; then 
  +  LOCALCLASSPATH=$CLASSPATH
  +elif [ -n $CLASSPATH_OVERRIDE ] ; then
  +  LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
  +else
  +  LOCALCLASSPATH=$LOCALCLASSPATH:$CLASSPATH
   fi
   
   # remove class path from launcher -lib option
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2004-02-11 Thread antoine
antoine 2004/02/11 00:29:38

  Modified:src/script ant
  Log:
  changes following tests under cygwin
  adding a second backslash to variables terminated with a backslash to ensure
  also prevent problem with evaluation of test expressions where -f is compared 
to something else
  this error message was happening
  + [ -f = --h -o -f = --help ]
  [: --h: unknown operand
  + [ -f = -h -o -f = -help ]
  [: -h: unknown operand
  
  Revision  ChangesPath
  1.45  +25 -3 ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- ant   9 Feb 2004 21:05:40 -   1.44
  +++ ant   11 Feb 2004 08:29:38 -  1.45
  @@ -27,11 +27,11 @@
   use_jikes_default=true
 elif [ $arg = --execdebug ] ; then
   ant_exec_debug=true
  -  elif [ $arg = --h -o $arg = --help ] ; then
  +  elif [ my$arg = my--h  -o my$arg = my--help  ] ; then
   show_help=true
   ant_exec_args=$ant_exec_args -h
 else
  -if [ $arg = -h -o $arg = -help ] ; then
  +if [  my$arg = my-h  -o  my$arg = my-help ] ; then
 show_help=true
   fi
   ant_exec_args=$ant_exec_args \$arg\
  @@ -243,7 +243,29 @@
 echo ' launch script'
 echo '  '
   fi
  -
  +# add a second backslash to variables terminated by a backslash under cygwin
  +if $cygwin; then
  +  case $CYGHOME in
  +*\\ )
  +CYGHOME=$CYGHOME\\
  +;;
  +  esac
  +  case $JIKESPATH in
  +*\\ )
  +JIKESPATH=$JIKESPATH\\
  +;;
  +  esac
  +  case $LOCALCLASSPATH in
  +*\\ )
  +LOCALCLASSPATH=LOCALCLASSPATH\\
  +;;
  +  esac
  +  case $CLASSPATH in
  +*\\ )
  +CLASSPATH=$CLASSPATH\\
  +;;
  +  esac
  +fi
   # Execute ant using eval/exec to preserve spaces in paths,
   # java options, and ant args
   ant_sys_opts=
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2004-02-05 Thread bodewig
bodewig 2004/02/05 05:09:28

  Modified:src/main/org/apache/tools/ant/launch Launcher.java
   src/script ant
  Log:
  Changes to make Ant installed in JPackage's RPM environment behave a
  little bit more friendly.
  
  * a new system property ant.lib.dir that if set will be used instead
of the location of ant-launcher.jar to slurp in the jars for Ant.
  
  * a --noconfig switch that suppresses sourcing of additional
configuration files.
  
  * various changes to the $rpm_mode specific parts of the file.
  
  Submitted by: Randy Watler rwatler at finali dot com
  
  Revision  ChangesPath
  1.13  +15 -1 ant/src/main/org/apache/tools/ant/launch/Launcher.java
  
  Index: Launcher.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/launch/Launcher.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Launcher.java 4 Feb 2004 20:37:24 -   1.12
  +++ Launcher.java 5 Feb 2004 13:09:27 -   1.13
  @@ -36,6 +36,9 @@
   /** The Ant Home property */
   public static final String ANTHOME_PROPERTY = ant.home;
   
  +/** The Ant Library Directory property */
  +public static final String ANTLIBDIR_PROPERTY = ant.library.dir;
  +
   /** The location of a per-user library directory */
   public static final String USER_LIBDIR = .ant/lib;
   
  @@ -138,7 +141,18 @@
   // Now try and find JAVA_HOME
   File toolsJar = Locator.getToolsJar();
   
  -URL[] systemJars = Locator.getLocationURLs(jarDir);
  +// determine ant library directory for system jars: use property
  +// or default using location of ant-launcher.jar
  +File antLibDir = null;
  +String antLibDirProperty = System.getProperty(ANTLIBDIR_PROPERTY);
  +if (antLibDirProperty != null) {
  +antLibDir = new File(antLibDirProperty);
  +}
  +if ((antLibDir == null) || ! antLibDir.exists()) {
  +antLibDir = jarDir;
  +System.setProperty(ANTLIBDIR_PROPERTY, 
antLibDir.getAbsolutePath());
  +}
  +URL[] systemJars = Locator.getLocationURLs(antLibDir);
   
   File userLibDir
   = new File(System.getProperty(user.home), USER_LIBDIR);
  
  
  
  1.43  +127 -35   ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- ant   2 Feb 2004 19:30:05 -   1.42
  +++ ant   5 Feb 2004 13:09:28 -   1.43
  @@ -14,23 +14,64 @@
   #   See the License for the specific language governing permissions and
   #   limitations under the License.
   
  -# load system-wide ant configuration
  -if [ -f /etc/ant.conf ] ; then
  -  . /etc/ant.conf
  -fi
  +# Extract launch and ant arguments, (see details below).
  +ant_exec_args=
  +no_config=false
  +use_jikes_default=false
  +ant_exec_debug=false
  +show_help=false
  +for arg in $@ ; do
  +  if [ $arg = --noconfig ] ; then
  +no_config=true
  +  elif [ $arg = --usejikes ] ; then
  +use_jikes_default=true
  +  elif [ $arg = --execdebug ] ; then
  +ant_exec_debug=true
  +  elif [ $arg = --h -o $arg = --help ] ; then
  +show_help=true
  +ant_exec_args=$ant_exec_args -h
  +  else
  +if [ $arg = -h -o $arg = -help ] ; then
  +  show_help=true
  +fi
  +ant_exec_args=$ant_exec_args \$arg\
  +  fi
  +done
   
  -# provide default values for people who don't use RPMs
  -if [ -z $rpm_mode ] ; then
  -  rpm_mode=false;
  -fi
  +# Source/default ant configuration
  +if $no_config ; then
  +  rpm_mode=false
  +  usejikes=$use_jikes_default
  +else
  +  # load system-wide ant configuration
  +  if [ -f /etc/ant.conf ] ; then
  +. /etc/ant.conf
  +  fi
  +
  +  # load user ant configuration
  +  if [ -f $HOME/.ant/ant.conf ] ; then
  +. $HOME/.ant/ant.conf
  +  fi
  +  if [ -f $HOME/.antrc ] ; then
  +. $HOME/.antrc
  +  fi
   
  -if [ -z $usejikes ] ; then
  -  usejikes=false;
  +  # provide default configuration values
  +  if [ -z $rpm_mode ] ; then
  +rpm_mode=false
  +  fi
  +  if [ -z $usejikes ] ; then
  +usejikes=$use_jikes_default
  +  fi
   fi
   
  -# load user ant configuration
  -if [ -f $HOME/.antrc ] ; then
  -  . $HOME/.antrc
  +# Setup Java environment in rpm mode
  +if $rpm_mode ; then
  +  if [ -f /usr/share/java-utils/java-functions ] ; then
  +. /usr/share/java-utils/java-functions
  +set_jvm
  +set_javacmd
  +  fi
   fi
   
   # OS specific support.  $var _must_ be set to either true or false.
  @@ -109,29 +150,58 @@
 exit 1
   fi
   
  -# in rpm_mode get ant/optional/xml parserapi from JAVALIBDIR
  -if $rpm_mode; then
  -  JAVALIBDIR=/usr/share/java
  -  for i in ant ant-optional jaxp_parser xml_apis
  -  do
  -if [ -z 

Re: cvs commit: ant/src/script ant

2004-02-05 Thread Stefan Bodewig
On 5 Feb 2004, [EMAIL PROTECTED] wrote:

   * a --noconfig switch that suppresses sourcing of additional
 configuration files.

this is not the full story, there now also is

  echo '  --help, --hprint this message and ant help'
  echo '  --noconfig suppress sourcing of /etc/ant.conf,'
  echo ' $HOME/.ant/ant.conf, and $HOME/.antrc'
  echo ' configuration files'
  echo '  --usejikes enable use of jikes by default, unless'
  echo ' set explicitly in configuration files'
  echo '  --execdebugprint ant exec line generated by this'
  echo ' launch script'

which we may want to discard or keep (I personally don't have a
strong opinon here).

Also the script will now source ~/.ant/ant.conf if present -
again, we can make this rpm_mode specific or drop completely.  I'd
like to keep it.

Finally the script has to do a lot of stuff to parse the command line
and plug it back together again as it now wants to parse some options
itself (and hide them from Ant).  This is not trivial to do in way
that works on all Bourne shell dialects out there, in particular with
command line arguments that contain spaces.

I've tested the new script on Linux, FreeBSD[1], MacOS X and Solaris,
using ANT_HOME with a space in it and a build file with a space in
it - it worked.  Things I couldn't test but that should be tested
are Korn shell based systems (AIX or OpenBSD) as well as Cygwin.

Cygwin users may note that ANT_LIB now runs through cygpath, I've no
idea whether this is actually needed and fixes a bug or causes
problems or is completely insignificant at all.

Stefan

Footnotes: 
[1]  I used minotaur as my testbed and accidently used the Ant 1.5.4
 installation on it first - this one failed for
 ant -f sand box/test.xml while the new script works.  I haven't
 tested the script of 1.6.0.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: ant/src/script ant

2004-02-05 Thread Peter Reilly
Stefan Bodewig wrote:
Finally the script has to do a lot of stuff to parse the command line
and plug it back together again as it now wants to parse some options
itself (and hide them from Ant).  This is not trivial to do in way
that works on all Bourne shell dialects out there, in particular with
command line arguments that contain spaces.
 

This sounds dangerous. Perhaps Main#processArgs could ignore the options
that are used by the ant script.
Peter
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


cvs commit: ant/src/script ant

2003-10-02 Thread conor
conor   2003/10/01 23:44:27

  Modified:.build.xml
   docs/manual running.html runninglist.html
   src/main/org/apache/tools/ant Main.java
   src/main/org/apache/tools/ant/launch Launcher.java
   src/script ant
  Added:   src/main/org/apache/tools/ant/launch LaunchException.java
  Log:
  merge
  
  Revision  ChangesPath
  1.396 +1 -1  ant/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/ant/build.xml,v
  retrieving revision 1.395
  retrieving revision 1.396
  diff -u -w -u -r1.395 -r1.396
  --- build.xml 25 Sep 2003 14:42:21 -  1.395
  +++ build.xml 2 Oct 2003 06:44:27 -   1.396
  @@ -772,7 +772,7 @@
 /manifest
   /jar
   
  -jar destfile=${build.lib}/nodeps.jar
  +jar destfile=${build.lib}/ant-nodeps.jar
basedir=${build.classes}
manifest=${manifest.tmp}
 and
  
  
  
  1.22  +68 -5 ant/docs/manual/running.html
  
  Index: running.html
  ===
  RCS file: /home/cvs/ant/docs/manual/running.html,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -w -u -r1.21 -r1.22
  --- running.html  16 Jul 2003 14:14:38 -  1.21
  +++ running.html  2 Oct 2003 06:44:27 -   1.22
  @@ -87,6 +87,7 @@
 -verbose, -v   be extra verbose
 -debug print debugging information
 -emacs produce logging information without adornments
  +  -lib pathspecifies a path to search for jars and classes
 -logfile lt;filegt;use given file for log
   -l lt;filegt;''
 -logger lt;classnamegt;the class which is to perform logging
  @@ -109,6 +110,45 @@
   pFor more information about code-inputhandler/code see
   a href=inputhandler.htmlInputHandler/a.
   
  +h3a name=libsLibrary Directories/a/h3
  +p
  +Prior to Ant 1.6, all jars in the ANT_HOME/lib would be added to the 
CLASSPATH
  +used to run Ant. This was done in the scripts that started Ant. From Ant 1.6,
  +two directories are scanned by default and more can be added as required. The
  +default directories scanned are ANT_HOME/lib and a user specific directory,
  +${user.home}/.ant/lib. This arrangement allows the Ant installation to be
  +shared by many users while still allowing each user to deploy additional 
jars.
  +Such additional jars could be support jars for Ant's optional tasks or jars
  +containing third-party tasks to be used in the build. It also allows the 
main Ant
  +installation to be locked down which will please system adminstrators.
  +/p
  +
  +p
  +Additional directories to be searched may be added by using the -lib option.
  +The -lib option specifies a search path. Any jars or classes in the 
directories
  +of the path will be added to Ant's classloader. The order in which jars are
  +added to the classpath is as follows
  +/p
  +
  +ul
  +  li-lib jars in the order specified by the -lib elements on the command 
line/li
  +  lijars from ${user.home}/.ant/lib/li
  +  lijars from ANT_HOME/lib/li
  +/ul
  +
  +p
  +Note that the CLASSPATH environment variable is passed to Ant using a -lib
  +option. Ant itself is started with a very minimalistic classpath.
  +/p
  +
  +p
  +The location of ${user.home}/.ant/lib is somewhat dependent on the JVM. On 
Unix
  +systems ${user.home} maps to the user's home directory whilst on recent
  +versions of Windows it will be somewhere such as
  +C:\Documentsnbsp;andnbsp;Settings\username\.ant\lib. You should consult 
your
  +JVM documentation for more details.
  +/p
  +
   h3Examples/h3
   blockquote
 preant/pre
  @@ -132,6 +172,13 @@
   the target called codedist/code, setting the codebuild/code property
   to the value codebuild/classes/code./p
   
  +blockquote
  +  preant -lib /home/ant/extras/pre
  +/blockquote
  +pruns Ant picking up additional task and support jars from the
  +/home/ant/extras location
  +/p
  +
   h3a name=filesFiles/a/h3
   
   pThe Ant wrapper script for Unix will source (read and evaluate) the
  @@ -207,19 +254,35 @@
   
   h2a name=viajavaRunning Ant via Java/a/h2
   pIf you have installed Ant in the do-it-yourself way, Ant can be started
  -with:/p
  +with two entry points:/p
   blockquote
 prejava -Dant.home=c:\ant org.apache.tools.ant.Main [options] 
[target]/pre
   /blockquote
   
  -pThese instructions actually do exactly the same as the codeant/code
  -command. The options and target are the same as when running Ant with the 
codeant/code
  -command. This example assumes you have set your classpath to include:/p
  +blockquote
  +  prejava -Dant.home=c:\ant org.apache.tools.ant.launch.Launcher [options] 
[target]/pre
  +/blockquote
  +
  +p
  +The first method runs Ant's traditional entry point. The second method uses
  +the Ant Launcher introduced in Ant 1.6. The 

Re: cvs commit: ant/src/script ant

2003-09-24 Thread Conor MacNeill
On Wed, 24 Sep 2003 06:06 am, Knut Wannheden wrote:
  These changes expand on Antoine's -lib code to support multiple -lib

 options.

  In addition, the -lib option can now name a directory containing jars and

 all

  jars in that directory will be added to Ant's launch classpath.

 So I suppose it isn't possible to add a directory with classes in it as
 a -lib option.  The classes need to be packed up in a jar, right?


No. It adds any jars in the directory and the directory itself. So, a 
directory with classes in it should be OK.

Conor


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant ant.bat

2003-09-24 Thread conor
conor   2003/09/24 07:52:47

  Modified:.build.bat build.sh
   src/main/org/apache/tools/ant/launch Launcher.java
   src/script ant ant.bat
  Log:
  merge
  
  Revision  ChangesPath
  1.39  +3 -10 ant/build.bat
  
  Index: build.bat
  ===
  RCS file: /home/cvs/ant/build.bat,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -w -u -r1.38 -r1.39
  --- build.bat 11 Aug 2003 13:18:19 -  1.38
  +++ build.bat 24 Sep 2003 14:52:47 -  1.39
  @@ -3,7 +3,6 @@
   REM   Copyright (c) 2000-2002 The Apache Software Foundation.  All rights
   REM   reserved.
   
  -set OLDCLASSPATH=%CLASSPATH%
   set REAL_ANT_HOME=%ANT_HOME%
   set ANT_HOME=bootstrap
   if exist bootstrap\lib\ant.jar if exist bootstrap\bin\ant.bat if exist 
bootstrap\bin\lcp.bat if exist bootstrap\bin\antRun.bat goto runAnt
  @@ -13,21 +12,15 @@
   goto cleanup
   
   :runAnt
  -set LOCALCLASSPATH=
  -for %%i in (lib\optional\*.jar) do call bootstrap\bin\lcp.bat %%i
  -set CLASSPATH=lib\optional\xalanj1compat.jar;%LOCALCLASSPATH%;%CLASSPATH%
  -set LOCALCLASSPATH=
  -
   if not %REAL_ANT_HOME% ==  goto install_ant
  -call bootstrap\bin\ant.bat -emacs %1 %2 %3 %4 %5 %6 %7 %8 %9
  +call bootstrap\bin\ant.bat -lib lib/optional %1 %2 %3 %4 %5 %6 %7 %8 %9
   goto cleanup
   
   :install_ant
  -call bootstrap\bin\ant.bat -emacs -Dant.install=%REAL_ANT_HOME% %1 %2 %3 
%4 %5 %6 %7 %8 %9
  +call bootstrap\bin\ant.bat -lib lib/optional -Dant.install=%REAL_ANT_HOME% 
%1 %2 %3 %4 %5 %6 %7 %8 %9
   
   rem clean up
   :cleanup
   set ANT_HOME=%REAL_ANT_HOME%
   set REAL_ANT_HOME=
  -set CLASSPATH=%OLDCLASSPATH%
  -set OLDCLASSPATH=
  +
  
  
  
  1.36  +1 -26 ant/build.sh
  
  Index: build.sh
  ===
  RCS file: /home/cvs/ant/build.sh,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -w -u -r1.35 -r1.36
  --- build.sh  11 Aug 2003 13:18:19 -  1.35
  +++ build.sh  24 Sep 2003 14:52:47 -  1.36
  @@ -28,31 +28,6 @@
 exit
   fi
   
  -LOCALCLASSPATH=
  -# add in the dependency .jar files
  -DIRLIBS=lib/optional/*.jar
  -for i in ${DIRLIBS}
  -do
  -if [ $i != ${DIRLIBS} ] ; then
  -LOCALCLASSPATH=$LOCALCLASSPATH:$i
  -fi
  -done
  -
  -# make sure the classpath is in unix format
  -if $cygwin ; then
  -CLASSPATH=`cygpath --path --unix $CLASSPATH`
  -fi
  -
  -CLASSPATH=$LOCALCLASSPATH:$CLASSPATH
  -
  -# switch back to Windows format
  -if $cygwin ; then
  -CLASSPATH=`cygpath --path --windows $CLASSPATH`
  -fi
  -
  -export CLASSPATH
  -
  -
   if [ $REALANTHOME !=  ] ; then
 if $cygwin; then
REALANTHOME=`cygpath --path --windows $REALANTHOME`
  @@ -62,5 +37,5 @@
 ANT_INSTALL=-emacs
   fi
   
  -bootstrap/bin/ant $ANT_INSTALL $*
  +bootstrap/bin/ant -lib lib/optional $ANT_INSTALL $*
   
  
  
  
  1.8   +50 -37ant/src/main/org/apache/tools/ant/launch/Launcher.java
  
  Index: Launcher.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/launch/Launcher.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -w -u -r1.7 -r1.8
  --- Launcher.java 23 Sep 2003 22:42:23 -  1.7
  +++ Launcher.java 24 Sep 2003 14:52:47 -  1.8
  @@ -58,6 +58,10 @@
   import java.net.MalformedURLException;
   import java.io.File;
   import java.util.StringTokenizer;
  +import java.util.List;
  +import java.util.ArrayList;
  +import java.util.Iterator;
  +
   
   /**
*  This is a launcher for Ant.
  @@ -118,43 +122,48 @@
   throw new IllegalStateException(Ant home is set incorrectly or 
   + ant could not be located);
   }
  -String libPath = ;
  -String[] newargs = null;
  -int argcount = -1;
  -for (argcount = 0; argcount  args.length -1; argcount++) {
  -if (args[argcount].equals(-lib)) {
  -libPath = args[argcount + 1];
  -break;
  -}
  -}
  -if (args.length  0  args[args.length -1].equals(-lib)) {
  -// if the last argument is -lib
  -// remove it from the arguments passed to Launcher
  -//
  -newargs = new String[args.length - 1];
  -System.arraycopy(args, 0, newargs, 0, args.length -1);
  -} else if (libPath.equals()) {
  -   newargs = new String[args.length];
  -   System.arraycopy(args, 0, newargs, 0, args.length);
  +
  +List libPaths = new ArrayList();
  +List argList = new ArrayList();
  +String[] newArgs;
  +
  +for (int i = 0; i  args.length; ++i) {
  +if (args[i].equals(-lib)) {
  +if (i == args.length - 1) {
  +throw new IllegalStateException(The -lib argument must 
  +  

cvs commit: ant/src/script ant

2003-09-23 Thread conor
conor   2003/09/23 08:40:36

  Modified:.Tag: ANT_16_BRANCH build.sh
   src/main/org/apache/tools/ant/launch Tag: ANT_16_BRANCH
Launcher.java
   src/script Tag: ANT_16_BRANCH ant
  Log:
  Add support for multiple -lib options. Also allow -lib to specify
  a directory of jars rather than just the directory itself. Update
  build.sh to use this. Unix only for now. Windows later.
  
  Revision  ChangesPath
  No   revision
  No   revision
  1.35.2.1  +1 -26 ant/build.sh
  
  Index: build.sh
  ===
  RCS file: /home/cvs/ant/build.sh,v
  retrieving revision 1.35
  retrieving revision 1.35.2.1
  diff -u -w -u -r1.35 -r1.35.2.1
  --- build.sh  11 Aug 2003 13:18:19 -  1.35
  +++ build.sh  23 Sep 2003 15:40:36 -  1.35.2.1
  @@ -28,31 +28,6 @@
 exit
   fi
   
  -LOCALCLASSPATH=
  -# add in the dependency .jar files
  -DIRLIBS=lib/optional/*.jar
  -for i in ${DIRLIBS}
  -do
  -if [ $i != ${DIRLIBS} ] ; then
  -LOCALCLASSPATH=$LOCALCLASSPATH:$i
  -fi
  -done
  -
  -# make sure the classpath is in unix format
  -if $cygwin ; then
  -CLASSPATH=`cygpath --path --unix $CLASSPATH`
  -fi
  -
  -CLASSPATH=$LOCALCLASSPATH:$CLASSPATH
  -
  -# switch back to Windows format
  -if $cygwin ; then
  -CLASSPATH=`cygpath --path --windows $CLASSPATH`
  -fi
  -
  -export CLASSPATH
  -
  -
   if [ $REALANTHOME !=  ] ; then
 if $cygwin; then
REALANTHOME=`cygpath --path --windows $REALANTHOME`
  @@ -62,5 +37,5 @@
 ANT_INSTALL=-emacs
   fi
   
  -bootstrap/bin/ant $ANT_INSTALL $*
  +bootstrap/bin/ant -lib lib/optional $ANT_INSTALL $*
   
  
  
  
  No   revision
  No   revision
  1.5.2.2   +45 -30ant/src/main/org/apache/tools/ant/launch/Launcher.java
  
  Index: Launcher.java
  ===
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/launch/Launcher.java,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -w -u -r1.5.2.1 -r1.5.2.2
  --- Launcher.java 22 Sep 2003 21:15:41 -  1.5.2.1
  +++ Launcher.java 23 Sep 2003 15:40:36 -  1.5.2.2
  @@ -58,6 +58,10 @@
   import java.net.MalformedURLException;
   import java.io.File;
   import java.util.StringTokenizer;
  +import java.util.List;
  +import java.util.ArrayList;
  +import java.util.Iterator;
  +
   
   /**
*  This is a launcher for Ant.
  @@ -118,37 +122,48 @@
   throw new IllegalStateException(Ant home is set incorrectly or 
   + ant could not be located);
   }
  -String libPath = ;
  -String[] newargs = null;
  -int argcount = -1;
  -for (argcount = 0; argcount  args.length -1; argcount++) {
  -if (args[argcount].equals(-lib)) {
  -libPath = args[argcount + 1];
  -break;
  -}
  +
  +List libPaths = new ArrayList();
  +List argList = new ArrayList();
  +String[] newArgs;
  +
  +for (int i = 0; i  args.length; ++i) {
  +if (args[i].equals(-lib)) {
  +if (i == args.length - 1) {
  +throw new IllegalStateException(The -lib argument must 
  ++ be followed by a library location);
   }
  -if (libPath.equals()) {
  -   newargs = new String[args.length];
  -   System.arraycopy(args, 0, newargs, 0, args.length);
  +libPaths.add(args[++i]);
   } else {
  -newargs = new String[args.length - 2];
  -// copy the beginning of the args array
  -if (argcount  0 ) {
  -System.arraycopy(args, 0, newargs, 0 ,argcount);
  -}
  -// copy the end of the args array
  -if ((argcount + 2  args.length)  argcount  0) {
  -System.arraycopy(args, argcount + 2, newargs, argcount, 
args.length - (argcount + 2));
  +argList.add(args[i]);
   }
   }
  -StringTokenizer myTokenizer = new StringTokenizer(libPath, 
System.getProperty(path.separator));
  -URL[] classPathJars = new URL[myTokenizer.countTokens()];
  -int classPathJarCount = 0;
  +
  +if (libPaths.size() == 0) {
  +newArgs = args;
  +} else {
  +newArgs = (String[]) argList.toArray(new String[0]);
  +}
  +
  +List libPathURLs = new ArrayList();
  +for (Iterator i = libPaths.iterator(); i.hasNext();) {
  +String libPath = (String) i.next();
  +StringTokenizer myTokenizer
  += new StringTokenizer(libPath, 
System.getProperty(path.separator));
   while (myTokenizer.hasMoreElements()) {
  -String token = myTokenizer.nextToken();
  -

Re: cvs commit: ant/src/script ant

2003-09-23 Thread Conor MacNeill
On Wed, 24 Sep 2003 01:40 am, [EMAIL PROTECTED] wrote:
 conor   2003/09/23 08:40:36

   Modified:.Tag: ANT_16_BRANCH build.sh
src/main/org/apache/tools/ant/launch Tag: ANT_16_BRANCH
 Launcher.java
src/script Tag: ANT_16_BRANCH ant
   Log:
   Add support for multiple -lib options. Also allow -lib to specify
   a directory of jars rather than just the directory itself. Update
   build.sh to use this. Unix only for now. Windows later.


These changes expand on Antoine's -lib code to support multiple -lib options. 
In addition, the -lib option can now name a directory containing jars and all 
jars in that directory will be added to Ant's launch classpath.

I've made these changes to the Unix side of things for now. I'll be on a 
Windows box tomorrow to make the appropriate changes there.

I moved the -lib $CLASSPATH behind the main arguments ($@) to catch things 
like incomplete argument specifications such as

ant -lib

The build.sh file has been updated to use these new features to pick up 
lib/optional as a -lib directory.

You'll need to bootstrap to pick up these features and have the build.sh file 
work.

I'll merge across when I've done the Windows changes.

Conor




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: ant/src/script ant

2003-09-23 Thread Knut Wannheden

 These changes expand on Antoine's -lib code to support multiple -lib
options.
 In addition, the -lib option can now name a directory containing jars and
all
 jars in that directory will be added to Ant's launch classpath.


So I suppose it isn't possible to add a directory with classes in it as
a -lib option.  The classes need to be packed up in a jar, right?

--
knut




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: cvs commit: ant/src/script ant

2003-09-23 Thread Gus Heck
These changes arn't working for me.
See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23358
-Gus
Knut Wannheden wrote:
These changes expand on Antoine's -lib code to support multiple -lib
   

options.
 

In addition, the -lib option can now name a directory containing jars and
   

all
 

jars in that directory will be added to Ant's launch classpath.
   

So I suppose it isn't possible to add a directory with classes in it as
a -lib option.  The classes need to be packed up in a jar, right?
--
knut

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


cvs commit: ant/src/script ant ant.bat

2003-07-10 Thread conor
conor   2003/07/10 04:29:39

  Modified:.build.xml
   src/script ant ant.bat
  Log:
  Remove warning about JAVA_HOME as it isn't required anymore
  
  Revision  ChangesPath
  1.386 +36 -36ant/build.xml
  
  Index: build.xml
  ===
  RCS file: /home/cvs/ant/build.xml,v
  retrieving revision 1.385
  retrieving revision 1.386
  diff -u -w -u -r1.385 -r1.386
  
  
  
  1.38  +0 -5  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -w -u -r1.37 -r1.38
  --- ant   9 Jul 2003 13:11:16 -   1.37
  +++ ant   10 Jul 2003 11:29:38 -  1.38
  @@ -138,11 +138,6 @@
 done
   fi
 fi
  -else
  -  echo Warning: JAVA_HOME environment variable is not set (or not 
exported).
  -  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
   
   # Allow Jikes support (off by default)
  
  
  
  1.31  +0 -6  ant/src/script/ant.bat
  
  Index: ant.bat
  ===
  RCS file: /home/cvs/ant/src/script/ant.bat,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -w -u -r1.30 -r1.31
  --- ant.bat   10 Jul 2003 03:32:34 -  1.30
  +++ ant.bat   10 Jul 2003 11:29:38 -  1.31
  @@ -63,12 +63,6 @@
   
   :noJavaHome
   if %_JAVACMD% ==  set _JAVACMD=java.exe
  -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
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



cvs commit: ant/src/script ant

2003-03-31 Thread bodewig
bodewig 2003/03/31 01:22:25

  Modified:.Tag: ANT_15_BRANCH WHATSNEW
   src/main/org/apache/tools/ant/taskdefs/optional/starteam
Tag: ANT_15_BRANCH TreeBasedTask.java
   src/script Tag: ANT_15_BRANCH ant
  Log:
  Merge fixes for 17646 and 17721 from HEAD
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.263.2.130 +5 -0  ant/WHATSNEW
  
  Index: WHATSNEW
  ===
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.263.2.129
  retrieving revision 1.263.2.130
  diff -u -r1.263.2.129 -r1.263.2.130
  --- WHATSNEW  27 Mar 2003 10:07:19 -  1.263.2.129
  +++ WHATSNEW  31 Mar 2003 09:22:24 -  1.263.2.130
  @@ -33,6 +33,11 @@
   * The prefix attribute of zipfileset would not generate directory
 entries for the prefix itself.  Bugzilla Report 18403.
   
  +* starteam checkout can now handle deleted labels.  Bugzilla Report 17646.
  +
  +* The Unix wrapper script failed if you invoked it as a relative
  +  symlink and ANT_HOME has not been set.  Bugzilla Report 17721.
  +
   Other Changes:
   --
   * Added ability to specify manifest encoding for the jar and 
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.8.2.4   +1 -1  
ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java
  
  Index: TreeBasedTask.java
  ===
  RCS file: 
/home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/TreeBasedTask.java,v
  retrieving revision 1.8.2.3
  retrieving revision 1.8.2.4
  diff -u -r1.8.2.3 -r1.8.2.4
  --- TreeBasedTask.java13 Feb 2003 13:59:53 -  1.8.2.3
  +++ TreeBasedTask.java31 Mar 2003 09:22:25 -  1.8.2.4
  @@ -566,7 +566,7 @@
   for (int i = 0; i  allLabels.length; i++) {
   Label stLabel = allLabels[i];
   log(checking label  + stLabel.getName(), Project.MSG_DEBUG);
  -if (stLabel.getName().equals(this.label)) {
  +if (stLabel != null  !stLabel.isDeleted()  
stLabel.getName().equals(this.label)) {
   if (!stLabel.isRevisionLabel()  !stLabel.isViewLabel()) {
   throw new BuildException(Unexpected label type.);
   }
  
  
  
  No   revision
  
  
  No   revision
  
  
  1.19.2.15 +4 -4  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.19.2.14
  retrieving revision 1.19.2.15
  diff -u -r1.19.2.14 -r1.19.2.15
  --- ant   21 Feb 2003 11:54:51 -  1.19.2.14
  +++ ant   31 Mar 2003 09:22:25 -  1.19.2.15
  @@ -55,7 +55,7 @@
 while [ -h $PRG ] ; do
   ls=`ls -ld $PRG`
   link=`expr $ls : '.*- \(.*\)$'`
  -if expr $link : '.*/.*'  /dev/null; then
  +if expr $link : '/.*'  /dev/null; then
PRG=$link
   else
PRG=`dirname $PRG`/$link
  @@ -150,9 +150,9 @@
   
 # OSX hack to make Ant work with jikes
 if $darwin ; then
  -
OSXHACK=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes
  -if [ -d ${OSXHACK} ] ; then
  -  for i in ${OSXHACK}/*.jar
  +OSXHACK=${JAVA_HOME}/../Classes
  +if [ -d ${OSXHACK} ] ; then
  +  for i in ${OSXHACK}/*.jar
 do
   JIKESPATH=$JIKESPATH:$i
 done
  
  
  


cvs commit: ant/src/script ant

2003-03-27 Thread bodewig
bodewig 2003/03/27 00:24:21

  Modified:.WHATSNEW
   src/script ant
  Log:
  Make wrapper script work if ant is a relative symlink and ANT_HOME
  isn't set.
  
  PR: 17721
  Submitted by: Martin Frost martin at macrospace dot com
  
  Revision  ChangesPath
  1.372 +3 -0  ant/WHATSNEW
  
  Index: WHATSNEW
  ===
  RCS file: /home/cvs/ant/WHATSNEW,v
  retrieving revision 1.371
  retrieving revision 1.372
  diff -u -r1.371 -r1.372
  --- WHATSNEW  27 Mar 2003 08:02:15 -  1.371
  +++ WHATSNEW  27 Mar 2003 08:24:21 -  1.372
  @@ -72,6 +72,9 @@
   
   * starteam checkout can now handle deleted labels.  Bugzilla Report 17646.
   
  +* The Unix wrapper script failed if you invoked it as a relative
  +  symlink and ANT_HOME has not been set.  Bugzilla Report 17721.
  +
   Other changes:
   --
   * The filesetmanifest attribute of jar has been reenabled.
  
  
  
  1.35  +1 -1  ant/src/script/ant
  
  Index: ant
  ===
  RCS file: /home/cvs/ant/src/script/ant,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- ant   7 Mar 2003 08:42:26 -   1.34
  +++ ant   27 Mar 2003 08:24:21 -  1.35
  @@ -51,7 +51,7 @@
 while [ -h $PRG ] ; do
   ls=`ls -ld $PRG`
   link=`expr $ls : '.*- \(.*\)$'`
  -if expr $link : '.*/.*'  /dev/null; then
  +if expr $link : '/.*'  /dev/null; then
PRG=$link
   else
PRG=`dirname $PRG`/$link