ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject RE: How do I specify multiple Windows directories in one <propert y name> statement?
Date Sat, 04 May 2002 02:11:48 GMT
--- Daniel Barclay <> wrote:
> > "Fail" in what sense? Where?
> In the sense that the excised example would end up as something 
> like "C:\xyz\dir1:C:\xyz\dir2".  Wouldn't that cause a problem.

To reiterate: Not if you're referencing that property in an attribute that
expects a path, since the path-separator colon will be converted to a

To make it 100% guaranteed not to be a problem (even in tasks like
<echo>), set a <path> with that property, then set a new property based on
the path's ID, and reference the new property everywhere your build file
currently references the property you're using now. For example (note that
I've changed your backslashes to foreslashes and kept the colon as the
path separator):

  <property name="some.path" value="C:/xyz/dir1:C:/xyz/dir2"/>
  <path id="whatever">
    <pathelement path="${some.path}"/>
  <property name="whatever" refid="whatever"/>

  <target name="echoit">
    <echo>whatever = ${whatever}</echo>

$ ant -f echoit
     [echo] whatever = C:\xyz\dir1;C:\xyz\dir2

Note that the foreslashes are now backslashes and the path separator is
now a semicolon.



Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

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

View raw message