Scot:
A "fileset that does not exist" is a contradiction
in terms. A fileset, by definition, consists of
existing files accessible from an existing directory.
Nonexistence of the parent directory yields a build
error, as you have seen. If no child files can be
matched by the fileset's (explicit or implicit)
patterns the fileset will be empty (additional
narrowing is accomplished by any nested selectors).
You can, however, use filelists, paths, and
pathelements to compose paths some of whose members do
not exist.
HTH,
Matt
--- "Scot P. Floess" <[EMAIL PROTECTED]> wrote:
> Help...this is driving me nuts ;)
>
> Let's say I want to define a path - but for
> "whatever" reason parts of
> the path do not exist as specified in a fileset or
> dirset. Below is an
> example (please note - I have no /foo directory on
> my harddrive):
>
> <project name = "dir-test" default = "output">
> <taskdef resource =
> "net/sf/antcontrib/antlib.xml"/>
>
> <path id = "PATH_REF_ID">
> <fileset dir = "/foo">
> <include name = "**/**.jar"/>
> </fileset>
> </path>
>
> <pathconvert property = "PATH" refid =
> "PATH_REF_ID"/>
>
> <target name = "output">
> <!--
> -
> - Loop through all javacc files to
> compile...
> -
> -->
> <for param = "path-part">
> <path refid = "PATH_REF_ID"/>
>
> <sequential>
> <echo message = "@{path-part}"/>
> </sequential>
> </for>
> </target>
> </project>
>
> Above, I actually tried two things - using a
> <pathconvert> as well as
> trying to iterate over the path using <for>.
> Regardless, I get flagged
> from ant stating /foo does not exist - which it
> doesn't ;) Really, what
> I am trying to figure out is, in a much larger
> sense, if I have filesets
> where some portions do exist and others do not, how
> can I output what is
> there. One way was to wrap in a <try> <catch> but I
> didn't really like
> that solution...as the failure arose and all I could
> do was output a
> message stating "some parts do not exist"
>
> It's not any better setting a property and using
> refid of the path
> either - doesn't work - same error :|
>
> Anyone have a good suggestion to the above? It's a
> long story as to why
> I want to output in this way...but I have a reason
> for wanting to do so :)
>
> Thanks ahead of time!
>
> Scot
>
> --
> Scot P. Floess
> 27 Lake Royale
> Louisburg, NC 27549
>
> 252-478-8087 (Home)
> 919-754-4592 (Work)
>
> Chief Architect JPlate
> http://sourceforge.net/projects/jplate
> Chief Architect JavaPIM
> http://sourceforge.net/projects/javapim
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]