ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Barclay <>
Subject search-path and drive-letter colons - can Ant handle one-letter d irectory names?
Date Wed, 08 May 2002 15:33:04 GMT

> From: Diane Holt []
> ... setting your basedir to a hard-coded
> full path seems like a sure-fire way to massively reduce the 
> portability ....

(Yes, I know.  It's just a simple, concrete example to ask how Ant 
evaluates non-absolute pathnames.)

Anyway, back to what I was originally trying to get at:

Given a default drive and directory of "D:\x":

- An Ant search path string of "ccc:/yyy" refers to Windows pathnames 
  "D:\x\ccc" and "D:\yyy", right?

- Then "cc:/yy" refers to "D:\x\cc" and "D:\yy", right?

- Then "c:/y" should refer to "D:\x\c" and "D:\y", rig...uh...hmmm.

Does Ant treat "c:/y" as a two-element search path consisting of 
"c" and "/y", or is it one-element search path referring to "C:\y"?

Hopefully you can see my concerns: 

- If "c:/y" is interpreted as a one-element search path, what string 
  do I use if I want "c" and "/y"?

- What if you have "${prop1}:${prop2}" deep inside a build file and 
  you don't know that later prop1 might be set to "c" and "prop2" to 

Are Ant's rules for interpreting colons in search path strings
documented publicly (so users can know how to construct build
files that don't break unexpectedly)?

- Does Ant assume that a single letter followed by a colon is a drive
  letter specification and not a single-letter pathname followed by a 
  separating colon?

- Does it depend on whether the drive letter is valid on the given
  system when Ant runs?

- Does is depend on the operating system?  (If one gave "c:/y" when running 
  Ant on Unix, would it be parsed as a single pathname that is invalid, or 
  as two pathnames ("c" and "/y")?)

- Is there any mechanism for forcing interpretation as separate search path 
  elements?  (Always using semi-colons seems to be the answer.)

Maybe the documentation should recommend using ";" as a path separator to
avoid the above ambiguity.  (Well, as long as no one uses ";" in file or
directory names on other platforms...)


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

View raw message