You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Patrik Nagel <pa...@gmx.ch> on 2009/05/02 20:46:33 UTC

fileset based on paths in file

Hi,

I would like to create a fileset based on paths which have no base 
directory in common. Additionally, the paths are stored in a text file.

Such a text file might looks as follows:
/home/dev/src/reporting
/home/dev/src/common
/home/testing/src/logger

Is there a way to read the paths from the text file and "add" them to a 
fileset? Within this fileset I would apply a filename selector to 
collect all build.xml files. Note that the fileset is used as a child 
within an ivy:buildlist task.

Any help would be appreciated!

Regards,
Patrik

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


Re: fileset based on paths in file

Posted by Patrik Nagel <pa...@gmx.ch>.
It's for a fileset. I tried the "includesfile" attribute from the 
fileset task. It does exactly what I'm looking for!

Tanks a lot!
Patrik

David Weintraub wrote:
> Is this for a path or a fileset? There's a big difference. A path is
> simply a collection of directories while a fileset selects files in a
> directory.
>
> If this is for a path, you could use a properties file and separate
> those directories via a colon or semicolon.
>
> If this is a fileset, you can try using the "includefile" attribute.
> For example:
>
> <fileset dir="/"
>     includefile="${my.include.file}/>
>
> And the include file will look like this:
>
> home/dev/src/reporting/**
> home/dev/src/common/**
> home/testing/src/logger/**
>
> On Sat, May 2, 2009 at 2:46 PM, Patrik Nagel <pa...@gmx.ch> wrote:
>   
>> Hi,
>>
>> I would like to create a fileset based on paths which have no base directory
>> in common. Additionally, the paths are stored in a text file.
>>
>> Such a text file might looks as follows:
>> /home/dev/src/reporting
>> /home/dev/src/common
>> /home/testing/src/logger
>>
>> Is there a way to read the paths from the text file and "add" them to a
>> fileset? Within this fileset I would apply a filename selector to collect
>> all build.xml files. Note that the fileset is used as a child within an
>> ivy:buildlist task.
>>
>> Any help would be appreciated!
>>
>> Regards,
>> Patrik
>>
>> ---------------------------------------------------------------------
>> 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 based on paths in file

Posted by David Weintraub <qa...@gmail.com>.
Is this for a path or a fileset? There's a big difference. A path is
simply a collection of directories while a fileset selects files in a
directory.

If this is for a path, you could use a properties file and separate
those directories via a colon or semicolon.

If this is a fileset, you can try using the "includefile" attribute.
For example:

<fileset dir="/"
    includefile="${my.include.file}/>

And the include file will look like this:

home/dev/src/reporting/**
home/dev/src/common/**
home/testing/src/logger/**

On Sat, May 2, 2009 at 2:46 PM, Patrik Nagel <pa...@gmx.ch> wrote:
> Hi,
>
> I would like to create a fileset based on paths which have no base directory
> in common. Additionally, the paths are stored in a text file.
>
> Such a text file might looks as follows:
> /home/dev/src/reporting
> /home/dev/src/common
> /home/testing/src/logger
>
> Is there a way to read the paths from the text file and "add" them to a
> fileset? Within this fileset I would apply a filename selector to collect
> all build.xml files. Note that the fileset is used as a child within an
> ivy:buildlist task.
>
> Any help would be appreciated!
>
> Regards,
> Patrik
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>



-- 
David Weintraub
qazwart@gmail.com

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


Re: fileset based on paths in file

Posted by Francis Galiegue <fg...@one2team.com>.
Le Saturday 02 May 2009 20:46:33 Patrik Nagel, vous avez écrit :
> Hi,
>
> I would like to create a fileset based on paths which have no base
> directory in common. Additionally, the paths are stored in a text file.
>
> Such a text file might looks as follows:
> /home/dev/src/reporting
> /home/dev/src/common
> /home/testing/src/logger
>
> Is there a way to read the paths from the text file and "add" them to a
> fileset? Within this fileset I would apply a filename selector to
> collect all build.xml files. Note that the fileset is used as a child
> within an ivy:buildlist task.
>
> Any help would be appreciated!
>

I believe ant 1.7's <filelist> is what you want. Not sure, though, since I'm 
stuck with ant 1.6.5.

-- 
Francis Galiegue
fge@one2team.com
Ingénieur système
Mob : +33 (0) 683 877 875
Tel : +33 (0) 178 945 552
One2team
40 avenue Raymond Poincaré
75116 Paris

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