ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: Common path definitions
Date Mon, 09 Jul 2001 19:48:11 GMT
--- Kyle Adams <> wrote:
> The problem I ran into with this is that the root, or the drive that
> development-related stuff was stored on, changed depending on the user. 
> For some it was d:, for others c:, and for others still, plain ol' *nix
> root ('/').  So the location of their source tree changed.  Which mean
> that Ant couldn't count on this file being in any particular location. 
> So by placing a properties file in ${user.home}, which Ant could ALWAYS
> locate, and by setting a ${root} variable in that properties file, I
> could bootstrap the main properties file (the one stored in the source
> tree).

I can't think of any build-system I've ever worked on that didn't require
having defined somewhere in the environment the root of the workspace you
were working in -- eg., set by an in-house tool you run to "get into" that
workspace (probably the weirdest was one that set up a small OS and
chroot'd you into that :), or set in conjunction with using an SCM tool
(eg., with P4, if you have the client name, you can get the root of the
tree), etc. 

But if you didn't have/need any such env-setting, then with Ant, if you've
put your Ant stuff into your SCM (which you should do anyway, since the
tools used to produce a build are just as much a part of the build as the
source), then you should be able to derive the root from the (required)

> On a related note, I hope that ${user.home} (or a similar solution)
> doesn't go away in Ant2.  It's extremely useful variable (as shown
> above) for cross-platform Ant deployment.

I doubt it would go away -- but I personally wouldn't rely on what's in
anyone's home directory (they can be pretty scary places :)



Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail

View raw message