You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/08/15 23:00:00 UTC

DO NOT REPLY [Bug 40259] New: - FileSet should include an attribute to specify not found behavior

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259

           Summary: FileSet should include an attribute to specify not found
                    behavior
           Product: Ant
           Version: 1.6.5
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: rgeclipse@hotmail.com


FileSet should include an attribute to specify not found behavior.

Currently, if a FileSet is created with a dir attribute that points to a non-
existing dir, then ant fails.

I have run into many situations in which I'd prefer ant to just return an empty 
FileSet.

Therefore, I propose a notFound attribute for FileSet that would support at 
least the following two values:

fail (the current behavior)
empty (returns an empty FIleSet)

The default can be set to fail since that would duplicate current behavior.

If you are contemplating changing default behavior, I think that empty is a 
much better default than fail except for legacy issues.

Thanks,

Ross

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259





------- Additional Comments From ddevienne@gmail.com  2006-11-22 12:46 -------
dirnotfound is not bad. But maybe we should add the "on" prefix, to parallel the
boolean failonerror ==> ondirnotfound

Maybe a combo failonerror+verbose might be better, because failonerror is an
attribute used in other places. So:

failonerror="true"  verbose="*"     ==> fail
failonerror="false" verbose="true"  ==> warn
failonerror="false" verbose="false" ==> ignore

Just thinking out loud. --DD

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259





------- Additional Comments From gudnabrsam@yahoo.com  2006-11-22 11:28 -------
Documenting further thoughts on this:

If an EnumeratedAttribute is used, my preference would be:

fail (default)
warn (empty results with a warning)
ignore (empty results, no warning)

I'll add them if I think of any more.

Also, "notfound" is not descriptive enough an attribute name.  To me this
suggests "no matching files found" and could be confusing to users.  Verbose as
it may be, something like "dirnotfound" or even the grammatically ugly
"dirnotexists" carries the minimum amount of semantic content to differentiate
between possible meanings, IMHO.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259


gudnabrsam@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |1.7




------- Additional Comments From gudnabrsam@yahoo.com  2006-09-19 20:44 -------
In Ant 1.7 you can use the <files> collection to specify files with absolute
paths.  Since there is no dir attribute, there can be no failure due to its
non-existence.  Problem solved!

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259





------- Additional Comments From peterreilly@apache.org  2006-11-22 13:33 -------
+1 for failonerror and verbose

As regards using the fileset where the dir
is not present, this could be a problem, we could
look at the ant codebase and see what (if anything)
code needs to be added.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259


peterreilly@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |enhancement
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
   Target Milestone|1.7                         |---




------- Additional Comments From peterreilly@apache.org  2006-09-19 21:05 -------
I am gooing to reopen this, as an enhancement request, at least for
the moment.
 * It will take a *long* time before all third party antlibs are
   1.7 capable,
 * <fileset> is part of most scripts and people know it.

I ran into this problem recently. I had a directory containing jars
in SourceCodeControl. Jars were been added and removed depending
on the code. At one stage no jar files were left, my build script
still worked, but my collegues did not. The reason was that the SCC system
did not bother to create the directory since there were no files in it.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259





------- Additional Comments From gudnabrsam@yahoo.com  2006-11-22 13:55 -------
DirectoryScanner currently throws an IllegalStateException if basedir does not
exist.  Because a DS can be used standalone (it has a public constructor) it
would probably be easiest to make the proposed changes on DirectoryScanner and
have the setters on AbstractFileSet echo their settings to DirectoryScanner. 
That would cover most stuff; simply calling getDir() against an AFS doesn't
guarantee anything so code that doesn't verify that the result is a directory is
already broken if it makes that assumption and uses the directory in some way
other than to get a DS.

So, what's the timeframe for this?  :)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259


gudnabrsam@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|40916                       |
              nThis|                            |




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259





------- Additional Comments From stevel@apache.org  2006-09-19 22:05 -------
mmm. One problem w/ third party antlibs moving up to resources is that to do so
properly entails abandonding ant1.6. 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259





------- Additional Comments From gudnabrsam@yahoo.com  2006-11-21 14:12 -------
We can do this, but remember that FileSets are very much used
however-the-task-writer-felt-like-it.  So our main onus will be to modify
AbstractFileSet (and possibly DirectoryScanner though I think it should already
work), but we still can't guarantee that 3rd-party tasks won't break down when
using such a fileset.  Are we as a developer community satisfied with this?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 40259] - FileSet should include an attribute to specify not found behavior

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40259>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40259


antoine@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |40916
              nThis|                            |




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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