ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: Problem converting path to property when a fileset's dir does not exist
Date Wed, 19 Oct 2005 18:22:49 GMT
--- "Scot P. Floess" <> wrote:

> I was wondering if anyone can please help me?  I am
> having trouble 
> converting a path to a property when a fileset's dir
> does not exist.  

You will have to check for the directory's existence
before adding the offending fileset to the path.  I
assume your expectation of pathconvert results for a
fileset with no matching files (including when the
directory does not exist) is "".


<project default="foo">

  <path id="base">
    <fileset dir="a" />
    <fileset dir="b" />
    <fileset dir="c" />

  <path id="p" refid="base" />

  <target name="check">
    <available file="z" type="dir" property="found" />

  <target name="modify" if="found">
    <path id="p">
      <path refid="base" />
      <fileset dir="z" />

  <target name="foo" depends="check,modify">
    <pathconvert property="result" refid="p"
                 pathsep="${line.separator}" />



Yahoo! Mail - PC Magazine Editors' Choice 2005

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

View raw message