ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "KARR, DAVID (ATTSI)" <dk0...@att.com>
Subject RE: "available" appears to get confused if I use "-f buildfile"
Date Thu, 19 Aug 2010 20:47:27 GMT
> -----Original Message-----
> From: eric.wood@thomsonreuters.com
> [mailto:eric.wood@thomsonreuters.com]
> Sent: Thursday, August 19, 2010 1:29 PM
> To: user@ant.apache.org
> Subject: RE: "available" appears to get confused if I use "-f
> buildfile"
> 
> It would be useful to see the appropriate code snippets.
> 
> Eric

There's not much to see.  Here's the "available" task reference:

      <available file="review" type="dir" property="review.dir.exists"/>

This sits in a build file (we'll call it "otherbuild.xml" for reference)
in one directory and I'm importing this build file into the main build
file, which is in the current directory when I try to run the target.

If I'm importing the build file, and I do "ant <target>", it properly
detects the "review" directory in the current directory.  If I instead
do "ant -f ../dir/otherbuild.xml <target>", this doesn't work because it
looks for the "review" directory in the "../dir" directory, not the
current directory.

> -----Original Message-----
> From: KARR, DAVID (ATTSI) [mailto:dk068x@att.com]
> Sent: Thursday, August 19, 2010 2:08 PM
> To: Ant Users List
> Subject: "available" appears to get confused if I use "-f buildfile"
> 
> I have a build file that gets imported into my current build file.
The
> imported build file has an "available" task to set a property if a
> particular directory exists, in the current directory.
> 
> I have a situation where I might instead have to not have that
> "import",
> but instead do a "ant -f ../.../otherbuildfile <target>".
> 
> I tried doing this, and it appears that the "available" task didn't
> look
> in the current directory, but in the directory where the (formerly)
> imported build file resides.  I verified this with a file io monitor.
> It looked for my directory in the directory with the build file, not
> the
> current directory.
> 
> Is there a straightforward way to make "available" look in the current
> directory instead?
> 
> I'm using Ant 1.7.1.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message