ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harry J Walsh <>
Subject Clearcase and ant
Date Thu, 01 May 2003 09:23:29 GMT

I'm working on a java project using clearcase for our source control.  We 
currently use clearmake with javac to build our project.  I've recently 
started using ant and after spending quite a bit of time searching for 
information on how to integrate ant with clearcase I still haven't been 
able to successfully do it.

Clearmake doesn't use file modification dates to manage build dependencies 
but ant does.

So if I checkout a file and make some changes and then built it with ant, 
it will detect the checkout as newer than the .class file and rebuild it.  
That's fine, however if I then decide I nolonger want those changes and 
uncheckout the file it reverts to the original version and that file 
appears to have been modified before the .class file was generated so no 
rebuild is performed.

I've been looking at the source for the 'depend' task and it should be 
possible to modify that to include the clearcase file version information 
in the depcache.  Then I would be able to detect if a file version has 
changed since the last time it was built and remove the appropriate .class 
file or files.

However the act of finding each .java file used in the current ant target 
and reading the version selected by the config spec takes quite a while to 
run on our source tree.

So before I proceed with this mechanism I'm polling this list in the hope 
that one of you has already solved this particular issue.  I'm aware it 
might also be possible to use clearcase triggers to remove .class files 
when a .java checkout is cancelled, but I'm sure this will be problematic 
for us as it would be difficult to determine all the scenarious in which 
'older' versions of source files are failing to trigger rebuilds.

Running ant within 'clearaudit' doesn't work as each file generated appears 
to depend on every source file accessed by the ant process.

Any ideas or suggestions would be helpful.

Harry J Walsh

View raw message