Another approach is using id/refid on the fileset itself.

<classpath id="cp">
   <fileset id="fs1" ... /> 
   <fileset id="fs2" ... /> 
</classpath>

<javac classpathref="cp"/>

<copy todir>
  <fileset refid="fs1"/>
  <fileset refid="fs2"/>
</copy>


AntContrib has also a task <path2fileset> or something like that. Havent used 
it ....


Jan


>-----Ursprüngliche Nachricht-----
>Von: Konstantinos Karadamoglou [mailto:[EMAIL PROTECTED] 
>Gesendet: Mittwoch, 15. März 2006 17:51
>An: Ant Users List
>Betreff: Re: How to avoid redundat path and fileset declerations
>
>Thanks Matt for your help,
>
>Is it possible to share the way that you avoid that kind of 
>redundancy? What's your approach when you compose build.xml files
>
>On 15/03/06, Matt Benson <[EMAIL PROTECTED]> wrote:
>> --- Konstantinos Karadamoglou <[EMAIL PROTECTED]>
>> wrote:
>> [SNIP]
>> > What I could do is
>> > to have a global <fileset> but this cannot be done regarding the 
>> > nature of the project I am involved with. There is not a starting 
>> > directory for <fileset>.
>> >
>>
>> This use will be covered in more than one way in Ant
>> 1.7 with resource collections.  In particular there is a <files> 
>> collection that uses absolute paths as include patterns and has no 
>> base directory.  Read on for some help you can use now...
>>
>> > So at the end I have to update all filesets and classpaths 
>whenever 
>> > I add or remove a library or resource :(
>> >
>> >
>> > Do you know how I can tackle that problem? How do you avoid such 
>> > kind of redundancies? How do you keep a central point of 
>> > filesets/paths?
>> >
>> > Thank you in advance, Kostas
>>
>> see the id/refid construct mentioned at:
>> http://ant.apache.org/manual/using.html#path
>>
>> This convention is available for most of Ant's built in "types"
>> (http://ant.apache.org/manual/conceptstypeslist.html).
>>
>> HTH,
>> Matt
>>
>> __________________________________________________
>> 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]
>>
>>
>
>---------------------------------------------------------------------
>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]

Reply via email to