ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@cortexebusiness.com.au>
Subject Re: Order of attributes versus elements
Date Sun, 03 Mar 2002 01:02:44 GMT
Peter Donald wrote:

> On Sat, 2 Mar 2002 21:05, Conor MacNeill wrote:
> 
>>>>Should this
>>>>be specified in Ant1? How about Ant2? Alternatively, should it be left
>>>>undefined? In that case Build files which rely on any particular order
>>>>would be considered defective even if they happened to work
>>>>
>>>>Anyway, IMHO, I think this buildfile is broken.
>>>>
>>>I wouldn't say that. I would say the task is broken. BTW I think you will
>>>find that sort of construct in a few places (myrmidons build file for one
>>>and it also used to be in ants build file).
>>>
>>The construct is not broken and neither is the task. I'm happy to have
>><src> elements and srcDir attributes at the same time. What is broken is
>>having two Java files for one class in the set of paths given to javac
>>and expecting one of those paths to take precedence. The use of
>><exclude> elements is an indicator that this is a bit of a hack.
>>
> 
> So let me get this correct. You are saying that it is a **hack** that if you 
> specify java files in compile list and then the compiler compiles these files 
> rather than those that happen to be on it search path? 
> 


NO. Reread what I said.

Have a close look at the construct. It explicitly ***excludes*** the 
files in question. They are **not** in the compile list. In fact if they 
were in the compile list it wouldn't work because javac would be given 
two Java files for the same class. Don't you think it is odd that even 
though the build just went to some trouble to filter these files it 
specifically excludes them from compilation? Why is that? It is because 
it needs to compile them as a side-effect of compiling other classes. It 
needs to rely on the "search path" and it relies on it being constructed 
in a particular order. This is the nature of the "hack".

Conor




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


Mime
View raw message