ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: Re: To change directory in ANT
Date Wed, 11 Apr 2007 12:41:56 GMT

-----Original Message-----
From: query [] 
Sent: Wednesday, April 11, 2007 2:36 PM
To: Ant Users List
Cc: Trevor Harmon
Subject: Re: Re: To change directory in ANT

  In my ANT script, there are a few tasks which have to be executed
 in some different directory. After executing those tasks, ANT script should return back to
previous directory. So I want to change directory temporarily.
How can I do it?

>Yes, that is the expected behavior. <exec> creates a new shell  environment every
time it starts.
>Why exactly do you need to change the directory? It shouldn't be  necessary to do so.

Ant does a lot of file and directory based operations, all of those tasks support a dir 
or todir or similar attribute, i.e. the copy task =

from Ant manual

Copy a single file to a directory

  <copy file="myfile.txt" todir="../some/other/dir"/>

A snippet illustrating your concrete problem would be helpful.

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message