You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by chpchew <ch...@cs.usm.my> on 2004/01/15 10:21:51 UTC

FileSet problem: include file with folder name containing space

hi: 
    I am a newbie in using Ant. Please forgive me if I ask silly question.
    I try to set include file into the FileSet instance using this command. 

    String filename = "\Integration\Portal Gen\try.xml";
    FileSet fileset = new FileSet();
    fileset.setIncludes(filename );

    as a result, the fileset actually has two element in the fileset which is:
    1) \Integration\Portal,
    2)  Gen\try.xml

    Anyone can tell me on how to ignore the space when we includes file into the fileset.

    Thanks


regards,
Chew

Re: FileSet problem: include file with folder name containing space

Posted by chpchew <ch...@cs.usm.my>.
yes, you are right and it works.

thank you very much.


regards,
Chew



----- Original Message ----- 
From: "Stefan Bodewig" <bo...@apache.org>
To: <us...@ant.apache.org>
Sent: Thursday, January 15, 2004 5:26 PM
Subject: Re: FileSet problem: include file with folder name containing space


> On Thu, 15 Jan 2004, <ch...@cs.usm.my> wrote:
>
> >     String filename = "\Integration\Portal Gen\try.xml";
> >     FileSet fileset = new FileSet();
> >     fileset.setIncludes(filename );
>
> this is the setter for the includes attribute, which itself contains a
> comma *or space* separated list of patterns.  You have to use the
> equivalent of a nested <include> element instead:
>
> fileset.createInclude().setName(filename);
>
> Stefan
> -- 
> http://stefanbodewig.blogger.de/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: FileSet problem: include file with folder name containing space

Posted by Stefan Bodewig <bo...@apache.org>.
On Thu, 15 Jan 2004, <ch...@cs.usm.my> wrote:

>     String filename = "\Integration\Portal Gen\try.xml";
>     FileSet fileset = new FileSet();
>     fileset.setIncludes(filename );

this is the setter for the includes attribute, which itself contains a
comma *or space* separated list of patterns.  You have to use the
equivalent of a nested <include> element instead:

fileset.createInclude().setName(filename);

Stefan
-- 
http://stefanbodewig.blogger.de/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org