You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Raja Nagendra Kumar <Na...@tejasoft.com> on 2010/04/13 13:29:47 UTC

filelist to support selections as per the fileset

Hi,

Any reason, why <filelist> does not support include and excludes as in
fileset.

It would be very nice to have such support.

Regards,
Nagendra
C.T.O
www.tejasoft.com
-- 
View this message in context: http://old.nabble.com/filelist-to-support-selections-as-per-the-fileset-tp28228769p28228769.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: filelist to support selections as per the fileset

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-04-13, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:

> B.T.W are u aware of any implementation of <orderedfileset>..

Sorting is implemented as a decorator so we don't need to add it to each
and every resource collection:

<sort>
  <fileset .../>
</sort>

Stefan

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


RE: filelist to support selections as per the fileset

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
>I understand perfectly well the difference between a list and a set. You
don't seem to understand that <filelist> is used to specify files that don't
exist. 

Rick, could you pl. let me know where <filelist> could of best use,
specially when the file does not exist. I am not saying there are no use..
but this way it has a limited usage... as u are saying.. this is the way it
was scoped to.. 

>CAN NOT BE IMPLEMENTED given <filelist>'s semantics. 

Sure.. I don't think we both can go so far.. I was only trying to discuss my
thoughts only to get the broader view. I know how ant adds new features.. 

>I wish you could understand that.

No other option.. :)

B.T.W are u aware of any implementation of <orderedfileset>.. My quick
search only says it was discussed many times.. but does not seem to have any
yet.

Regards,
Nagendra


-- 
View this message in context: http://old.nabble.com/filelist-to-support-selections-as-per-the-fileset-tp28228769p28232011.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: filelist to support selections as per the fileset

Posted by Rick Genter <rg...@silverlink.com>.
> From: Raja Nagendra Kumar [mailto:Nagendra.Raja@tejasoft.com]
> Sent: Tuesday, April 13, 2010 7:05 AM
> To: user@ant.apache.org
> Subject: RE: filelist to support selections as per the fileset
> 
> 
> Hi Rick,
> 
> May be the name could be <orderedfileset>
> 
> but in the java world the one with order is called list and without
> order is
> called set.
> 
> filelist is a list of files which maintains the order. However how this
> list
> is filled could be either explicit way as it happens now or by way
> scanning
> though provided patterns.
> 
> I not sure, why you see this differently.

Hi Raja,

I understand perfectly well the difference between a list and a set. You don't seem to understand that <filelist> is used to specify files that don't exist. A wildcard makes no sense in that scenario. ANT uses <fileset> for existing files and <filelist> for potentially nonexistent files; the functionality you are asking for amounts to an ordering of <fileset>. <filelist> is intended for something else and what you are asking for CAN NOT BE IMPLEMENTED given <filelist>'s semantics. I wish you could understand that.

--
Rick Genter
Principal Software Engineer
Silverlink Communications
rgenter@silverlink.com
www.silverlink.com
Office (781) 583-7145
Mobile (408) 398-7006

This e-mail, including attachments, may include confidential and/or proprietary information, and may only be used by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately
  




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


RE: filelist to support selections as per the fileset

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.
Hi Rick,

May be the name could be <orderedfileset>

but in the java world the one with order is called list and without order is
called set.

filelist is a list of files which maintains the order. However how this list
is filled could be either explicit way as it happens now or by way scanning
though provided patterns.

I not sure, why you see this differently. 

> files	The list of file names. This is a list of file name separated by
> whitespace, or by commas.

support for patterns in files attribute makes a perfect sense to me.

Regards,
Nagendra

Rick Genter wrote:
> 
>> From: Raja Nagendra Kumar [mailto:Nagendra.Raja@tejasoft.com]
>> Sent: Tuesday, April 13, 2010 6:50 AM
>> To: user@ant.apache.org
>> Subject: Re: filelist to support selections as per the fileset
>> > adding wildcards support  can enhance refactorings of location of
>> these
>> > files. I use the wildcards for best support of refactorings. Such
>> support
>> > of wildcards in filelist would add great value.
> 
> Wildcards don't make sense for <filelist>. <filelist> works on names of
> files that *may*not*exist*. How do you apply a wildcard to generate the
> name of a file that doesn't exist?
> 
> You are asking for a different mechanism. It sounds like you want
> something like an <orderedfileset>. I encourage the ANT developers to
> not corrupt <filelist> to try and do things it wasn't designed for.
> --
> Rick Genter
> Principal Software Engineer
> Silverlink Communications
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/filelist-to-support-selections-as-per-the-fileset-tp28228769p28230712.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


RE: filelist to support selections as per the fileset

Posted by Rick Genter <rg...@silverlink.com>.
> From: Raja Nagendra Kumar [mailto:Nagendra.Raja@tejasoft.com]
> Sent: Tuesday, April 13, 2010 6:50 AM
> To: user@ant.apache.org
> Subject: Re: filelist to support selections as per the fileset
> > adding wildcards support  can enhance refactorings of location of
> these
> > files. I use the wildcards for best support of refactorings. Such
> support
> > of wildcards in filelist would add great value.

Wildcards don't make sense for <filelist>. <filelist> works on names of
files that *may*not*exist*. How do you apply a wildcard to generate the
name of a file that doesn't exist?

You are asking for a different mechanism. It sounds like you want
something like an <orderedfileset>. I encourage the ANT developers to
not corrupt <filelist> to try and do things it wasn't designed for.
--
Rick Genter
Principal Software Engineer
Silverlink Communications


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


Re: filelist to support selections as per the fileset

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-04-13, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:

> Stefan Bodewig wrote:

>> <filelist> means: here is a list of files that may or may not be there,
>> return all of them don't check whether they are there at all.  No
>> wildcards supported.

> adding wildcards support  can enhance refactorings of location of these
> files. I use the wildcards for best support of refactorings. Such support
> of wildcards in filelist would add great value.

No, that would be a different beast.

If you need an ordered <fileset>, wrap that <fileset> in a <sort>
resource collection.

Stefan

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


Re: filelist to support selections as per the fileset

Posted by Raja Nagendra Kumar <Na...@tejasoft.com>.


Stefan Bodewig wrote:
> 
> On 2010-04-13, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:
> 
>> Any reason, why <filelist> does not support include and excludes as in
>> fileset.
> 
>>The short version: Because they wouldn't make sense (well exclude
>>wouldn't and the nested include element just has a different name:
>>><file>).
> 
> ok. But I understand that filelist keeps the order of the files, where as
> fileset does not. In such senario, one could provide a series of patterns
> so that scan could happen in the same order of the patterns etc.
> 
> And also, if <file> and include are similar, it would have been nice to
> support <include> too so that it is consistant.. I understand <file> has
> more options too. 
> 
> 
>><filelist> means: here is a list of files that may or may not be there,
>>return all of them don't check whether they are there at all.  No
>>wildcards supported.
> 
> adding wildcards support  can enhance refactorings of location of these
> files. I use the wildcards for best support of refactorings. Such support
> of wildcards in filelist would add great value.
> 
> 
>>If you look at it this way, exclude doesnt make sense for <filelist>
> 
> if wildcards support then exclude would make sense.
> 
>>since you already list all files explicitly anyway.  If you need to
> filter the results, wrap the filelist in a <restrict>.
> 
> True, but if include and excludes are supported like in fileset, it would
> be much more straight forward.
> 
> 
>> It would be very nice to have such support.
> 
>>What would you use them for that you cannot do with the existing
>>functionality?
> 
> Would like to use wildcards so that my directory changes due to
> refactoring can be taken care better.
> 
> 

Regards,
Nagendra

-- 
View this message in context: http://old.nabble.com/filelist-to-support-selections-as-per-the-fileset-tp28228769p28230486.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: filelist to support selections as per the fileset

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-04-13, Raja Nagendra Kumar <Na...@tejasoft.com> wrote:

> Any reason, why <filelist> does not support include and excludes as in
> fileset.

The short version: Because they wouldn't make sense (well exclude
wouldn't and the nested include element just has a different name:
<file>).

<fileset> means: scan the file system for files matching one of the
include patterns and none of the exclude patterns and return what you've
found.

<filelist> means: here is a list of files that may or may not be there,
return all of them don't check whether they are there at all.  No
wildcards supported.

If you look at it this way, exclude doesnt make sense for <filelist>
since you already list all files explicitly anyway.  If you need to
filter the results, wrap the filelist in a <restrict>.

> It would be very nice to have such support.

What would you use them for that you cannot do with the existing
functionality?

Stefan

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