ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Fileset problem
Date Tue, 31 Jul 2001 05:18:05 GMT
On Mon, 30 Jul 2001, Eric Richardson <eric.richardson@milagrosoft.com>
wrote:

> Hi, I'm using the following to pass to <java> in a
> classpathref. I've included a jar and the directory in the <fileset>
> that has some loose class files.
> 
> <path id="my.classpath">
>     <fileset dir="${catalog.dir}">
>       <include name="catalog.jar"/>
>       <include name="${catalog.dir}"/>
>     </fileset>
> </path>

The nested <fileset> inside <path> will by design only pick up files,
not directories - make that

<path id="my.classpath">
    <pathelement location="${catalog.dir}" />
    <pathelement location="${catalog.dir}/catalog.jar" />
</path>

as you don't need the directory scanning/pattern matching
functionality of <fileset> anyway.

> The fileset does not include the directory

Even if it would include the directories matching include patterns,
your above <fileset> probably wouldn't work as the include/exclude
patterns are meant to be paths relative to the fileset's dir attribute
- whatever ${catalaog.dir} resolves to, I doubt it would be a valid
path relative to itself.

Stefan

Mime
View raw message