Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 34634 invoked by uid 500); 9 May 2001 16:59:44 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 34568 invoked from network); 9 May 2001 16:59:33 -0000 Date: Wed, 9 May 2001 09:57:11 -0700 (PDT) Message-Id: <200105091657.JAA10996@nagoya-a.betaversion.org> From: bugzilla@apache.org To: ant-dev@jakarta.apache.org, Daniel.Barclay@digitalfocus.com Cc: Subject: [Bug 1681] New - FileSet doesn't work with absolute pathnames X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1681 *** shadow/1681 Wed May 9 09:57:10 2001 --- shadow/1681.tmp.10992 Wed May 9 09:57:10 2001 *************** *** 0 **** --- 1,65 ---- + +============================================================================+ + | FileSet doesn't work with absolute pathnames | + +----------------------------------------------------------------------------+ + | Bug #: 1681 Product: Ant | + | Status: NEW Version: 1.3 | + | Resolution: Platform: PC | + | Severity: Normal OS/Version: | + | Priority: Component: Core | + +----------------------------------------------------------------------------+ + | Assigned To: ant-dev@jakarta.apache.org | + | Reported By: Daniel.Barclay@digitalfocus.com | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + The FileSet mechanism may need a way to specify files that accepts full file + pathnames (not just file pathname patterns that must be relative to a root + directory). + + The problem seems to be that an absolute filename does not work as a file + name pattern in an "includes" attribute. + + (I say "may" above because maybe there's another solution to my problem.) + + I encountered the problem trying to refer to a file by absolute pathname + for an "uptodate" task: + + + + + + + + The value of property xxx.fileLocation is an absolute pathname (a + Windows filename starting with "C:/..."). + + The above snippet does not work. It acts as if it can't find the file, + that is, as if the given absolute pathname does not identify the file. + + If I change the include element's name attribute value to a relative + pathname, it works. + + However, that does not seem to be an acceptable solution. Either you'd + have to maintain separate properties to hold relative vs. absolute names, + or you couldn't use absolute pathnames. (Note that I'm not talking about + hard-coded absolute pathnames, but absolute pathnames in properties built + up relatively, based on the project's base directory.) + + It should be possible to use absolute pathnames. + + Some possible solutions are: + + - have pattern matching compare a given pattern to the whole absolute + pathname of a candidate file (not just to the relative pathname after + the base directory) + - (if pattern matching is intended to work that way but just doesn't on + Windows, try to fix handling of Windows pathnames) + - add additional attibutes to take file names that are not patterns + + (Note that the last option also provides an escape mechanism for + files whose names contains characters normally interpreted as wildcards. + I don't recall whether Ant provides an escape mechanism for referring + to such files, but it should, and if it doesn't, that last option is one + way to do it.)