ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Annie Frost <>
Subject RE: How do I capture the current directory during execution?
Date Wed, 20 Jun 2001 00:44:19 GMT
I am working with Apache/Tomcat server configuration which requires the
server root and it cannot be a relative path (for Apache/conf/httpd.conf and

Several Developers in the building will be running Apache/Tomcat on their
machines and I cannot dictate where they are running it.
I am aiming to keep it as light as possible (trying to conform to Windows NT
right now without using any additional shells... pretty much DS bat programs
and ANT only)

I can assume the following:

The build.xml will be located such as 

The build.xml will be executed from 

Apache will be deployed as follows

Within the build.xml, I have a simple <replace> as follows
<replace file="..\..\adwe\rt\apache\conf\httpd.conf"  token="C:/adwe"
<replace file="..\..\adwe\rt\tomcat\conf\mod_jk.conf" token="C:/adwe"

For the most part, the ${server.root} is unnecessary as I can reach
everything through relative paths, but for the Apache set-up, I cannot seem
to pull the ${server.root} as a non-relative path.  Normally, the Apache
install would take care of this, but we have Apache stored in CVS and would
like to dynamically mod these files depending on each developers
environment....  Unless there is a simple solution, I could opt to prompt
each developer to enter the root as necessary each time, but this seems like
an excessive step...

Any hints?

-----Original Message-----
From: Brett Knights []
Sent: Tuesday, June 19, 2001 5:25 PM
Subject: RE: How do I capture the current directory during execution?

Why can't you just use
<param name="workDir" expression="${root}"/>
or some variation on that theme?

If I may ask why do you need to pass in the directory? I can process
directories with the trax processor (with Saxon behind it)
without any trouble.

FWIW Saxon contains an extension function that will return the system id of
the document being processed. If you really need to use
the location of the document in your stylesheet you might find that a method
in your stylesheet engine will do this for you (as well
as making your stylesheet not dependent on Ant)

-----Original Message-----
From: Annie Frost []
Sent: Tuesday, June 19, 2001 4:52 PM
To: ''
Subject: RE: How do I capture the current directory during execution?

Lorenzo -

Did you figure this out?  I am having the same problem.  Want to keep it
simple, but am having problems only using ANT.  Seems like
I can only write some other code to read in the directory and pass it...

-----Original Message-----
From: Lorenzo Rodriguez []
Sent: Tuesday, June 19, 2001 10:48 AM
To: ''
Subject: How do I capture the current directory during execution?

How can I process documents in a directory structure, and capture the
directory where the files are being processed from? I need to
pass it to a style sheet.  Here is my code:
<target name="publishItems" depends="init, prepare">
        <style basedir="${root}"
            <!-- param name="workDir" expression=""/ -->
The includes will match **/*.ent, but how can I find out what ** is so that
I can pass that value to sgml.xsl?

View raw message