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: ant bug or user error?
Date Wed, 27 Mar 2002 14:27:12 GMT
Stefan Bodewig wrote:

> On Tue, 26 Mar 2002, Paul Kilroy <paulkilroy@yahoo.com> wrote:
> 
> 
>>I get the following error when I run "ant foo moo":
>>BUILD FAILED
>>/home/pkilroy/antbug/build.xml:4: You must specify the
>>jar file to create!
>>
> 
> An Ant bug IMHO.
> 


Agreed. This bug arises from the tendency of many tasks to change, in their 
execute method, the state setup by the core using IntrospectionHelper. In this 
case it is the cleanup() method of Zip.java. In fact the cleanup method was 
changed as part of bug 4366
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4366

I'm not sure I understand the original bug report but it is probably a symptom 
of the same problem, the changing of the filesets in the execute() method. The 
fix, however, almost guarantees that the instance cannot be reused.


> 
>>I think the is related to the fact that ant caches
>>targets (and their tasks), but the task is "cleaned
>>up" at the end of the execute method. This pretty much
>>invalidates the cache for the target.
>>
> 
> Yes.
> 


Well, this task cleans itself up (kills itself really) but the core does not do 
any general task cleanup.


> 
>>-Don't run the target again, it's already been run.
>>
> 
> or alternatively, don't use cached tasks.


These two statements amount to the same thing, in general, don't they?


> 
> We've always said that "ant foo moo" is supposed to be the same as
> "ant foo; ant moo" which it obviously is not.
> 

This has never really been true that these are equivalent due to property 
immutability. In fact I know some builds that rely on this behaviour to setup 
different modes of operation.

I think that we need to perhaps examine how all tasks preserve their state as 
I'm sure this is not limited to the Zip task.

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