One can have a top-level fileset on unix.
However, the filename specs in the includes still need to be relative
so they cannot include a leading directory separator.
<target name="top">
<fileset id="files" dir="/" includes="etc/passwd"/>
<property name="files.converted" refid="files" />
<echo>files: ${files.converted}</echo>
<fileset id="files2" dir="/" includes="/etc/passwd"/>
<property name="files2.converted" refid="files2" />
<echo>files2: ${files2.converted}</echo>
</target>
outputs:
top:
[echo] files: etc/passwd
[echo] files2:
Peter
Kristian Perkins wrote:
I've never used a top level fileset before, didn't think you could do
that. I would use a <path> which contained the fileset.
<path id="files">
<fileset dir="/" includes="${files.prop}"/>
</path>
<property name="files.converted" refid="files" />
Holger Rauch wrote:
Hi!
I've run into a problem using filesets whose members contain absolute
path
names. The following short build script illustrates the problem. My
questions are:
Why is the property files.converted (supposed to hold the fileset's
contents)
empty even though the files actually exist on my system?
Aren't the includes of a fileset relative to the value of the dir
attribute?
If so, why doesn't it even work when I specify a / in order to denote
the
root dir of the filesystem?
-------------------------------------------------------------------------
<?xml version="1.0" encoding="iso-8859-1"?>
<project name="abs-path-fileset-test" default="do-test" basedir=".">
<target name="do-test">
<property name="files.prop" value="/home/hrauch/blah1
/home/hrauch/blah2" />
<fileset id="files" dir="/" includes="${files.prop}" />
<property name="files.converted" refid="files" />
<echo message="property files.prop = ${files.prop}" />
<echo message="property files.converted = ${files.converted}" />
</target>
</project>
-------------------------------------------------------------------------
I'm invoking the script from dir /home/hrauch/bazl/bazl-new/empic-suite
(i.e. not directly from the dir where blah1 and blah2 are located).
Thanks in advance for enlightening me on this issue :-)
Kind regards,
Holger
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]