ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 18715] New: - [PATCH] <subant> to specify basedir to <ant>
Date Fri, 04 Apr 2003 16:23:27 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18715>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18715

[PATCH] <subant> to specify basedir to <ant>

           Summary: [PATCH] <subant> to specify basedir to <ant>
           Product: Ant
           Version: 1.5.3
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: andreas.ames@tenovis.com
                CC: ddevienne@lgc.com


The patch applies to revision 1.1 of SubAnt.java in the cvs repository. 
 
It tries to achieve the following: 
 
* adds 'output' attribute to <subant> (directly corresponding to <ant>'s attribute
of the 
same name) 
* includes Gus Heck's patch (see 
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18391) 
* fixes small bug with removal of 'target' attribute's default value 
(getOwningTarget().getName()) (removal occured on addition to cvs) 
* specifies now 'dir' attribute to delegated <ant> (under certain circumstances, see

below) 
 
If the currently processed element of the 'buildpath' attribute is a filename, the original

behaviour is preserved.  But if the current element is a directoryname, the behaviour is 
as follows: 
 
* If the 'antfile' attribute is an absolute filename, then the following settings are given
to 
<ant>: 
 
- dir=current element of 'buildpath' 
- antfile = the value of <subant>'s 'antfile' attribute 
 
* If 'antfile' is not absolute (i.e. when the default value is used), the following settings

apply to <ant>: 
 
- dir=current element of 'buildpath' 
- antfile = the absolute filename that results when <subant>'s 'antfile' value is resolved

against the current element of 'buildpath'. 
 
To specify absolute filenames as the 'antfile' attribute to <ant> (which is not 
documented, AFAICT) is possible because of the (also undocumented) behaviour of 
FileUtils.resolveFile(file, filename), that it returns File(filename) if filename is absolute.
 
The check for absoluteness seems to be platform dependent.  It would be nice, if the 
maintainers could state, whether this behaviour will be preserved (i.e. setting absolute 
filenames to <ant>'s 'antfile'). 
 
For a short discussion about (and a rationale to) this patch, see 
http://marc.theaimsgroup.com/?t=104876704900001&r=1&w=2.  Please note that I've 
found no easy way to preserve full backwards compatibility as I've stated too rashly in 
my mail.

Mime
View raw message