ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: string substitutions
Date Sun, 07 Oct 2001 08:33:44 GMT

Hi Jerry,

If you run Ant in debug mode (ant -debug), then you can see all the
properties that Ant sets. Here you can see that 'user.dir' property stores
the present working directory of Ant.

- Siva

                    "Li, Jerry"                                                          
                    <Jerry.Li@World        To:     "''" <>
          >             cc:                                        
                                           Subject:     string substitutions             
                    10/07/01 12:23                                                       
                    Please respond                                                       
                    to ant-user                                                          

Hi, all:

I would like to dynamically get the name of a folder where I execute ant
from. For instance, if I launch ant in c:\temp, I would like to get c:\temp
via an ant pre-defined property or task. In GNU make, there is a system
variable of ${CURDIR}which holds this value. Is there any property
associated with this?

Secondly, could I make any substitution to a string. For instance, I would
like to get rid of c:\temp from a string of c:\temp\com\mycompany\servlet\.
Again, in GNU, there are various functions to substitute a string.

Your help will be highly appreciated,


Note:  The information contained in this message may be privileged and
confidential and protected from disclosure. If the reader of this message
not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby notified
that any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error,
please notify us immediately by replying to the message and deleting it
your computer. Thank you.

View raw message