ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <co...@cortexebusiness.com.au>
Subject Re: build.xml changes
Date Mon, 03 Jun 2002 12:28:41 GMT
C Santosh Kumar wrote:
> How do I make ant compile my programs again
> whenever I make changes in my build.xml?
> I have replaced certain libraries and want to recompile
> the source.
> 

There are two approaches here (probably more)

1. Provide a clean target which removes all classfiles. If you change the 
build file or even an external jar, use this target to do a complete 
recompile. So, assuming you have a compile task to compile the classes, you 
would use.

ant clean compile

2. The second mechanism would be to create a dependency between your output 
classes and the buildfile using the <uptodate> task with a suitable mapper. 
This would be used to set a property and the clean target made conditional 
on this property.

In my experience changing the build file is a rare event compared to 
building the code so the additional complexity of the second approach is not 
really warranted.

Conor



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


Mime
View raw message