ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jon Schewe <>
Subject allow one to pass a classpath to ant
Date Sun, 26 Nov 2000 23:26:35 GMT
The way that the current ant scripts are setup it's pretty hard to pass in a
classpath to ant and I really don't like setting environment variables to
project specific settings, so I modified the ant shell script as follows:

At the end of the file put the following, just above the execute command and
change the execute command to use $args instead of $@.
#allow someone to add to the classpath
for arg in $@; do
  echo $arg
  if [ $arg = "-classpath" ]; then
    set grabarg=grab
  elif [ -n $grabarg ]; then
    unset grabarg
    args="$args $arg"


Thought someone else might find this handy.  I haven't figured out how to do
this to the batch file too though.

Jon Schewe |
For I am convinced that neither death nor life, neither angels 
nor demons, neither the present nor the future, nor any 
powers, neither height nor depth, nor anything else in all 
creation, will be able to separate us from the love of God that 
is in Christ Jesus our Lord. - Romans 8:38-39
NOTE: My first name has no 'h' in it!  Please be observant.

View raw message