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.
Created attachment 5648 [details] patch against SubAnt.java, revision 1.1
Created attachment 6381 [details] slightly modified version of the patch proposed by Andreas Ames
I would prefer to create a specific attribute to support what Andreas Ames wants to do. I call it "genericantfile". I guess that you want to have as base dir in the sub builds the directory of the current iteration in the dirset, so I have added an ant.setDir(directory) in this case. Let me know if this is OK.
Code submitted, with an embryo of testcase and updated doc will be in the next nightly build I am closing the bug report for now; reopen it if there are any issues. reopen
*** Bug 18391 has been marked as a duplicate of this bug. ***
I'm -1 to ignoremissingbuildfile. Useless code/doc for something that's more naturally addressed by a fileset. This is turning Ant into Perl, where there's more than one way to do something, which is far for ideal to say the least in this case. This is an invalid use case, as opposed to genericAntFile. --DD
I will remove ignoremissingbuildfile tomorrow. Sorry for the trouble.
ignoremissingbuildfiles has been removed in CVS on 2003/05/22 07:27:50 (SubAnt. java revision 1.4) I am marking this bug report as resolved again.