ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raja Nagendra Kumar <>
Subject Re: JavaC and sourcepath
Date Tue, 25 Mar 2008 12:17:22 GMT

Thank you Stev for the pointers.. Let me create new taks with the code
snippets from depends filesets etc..


Steve Loughran wrote:
> Raja Nagendra Kumar wrote:
>> We are using lot of opensource library code, which also gets complied
>> from
>> source code. However, my code many not use all the sources of opensource
>> library. This way, me copying all the opensource source always is not
>> recommended. For this reason only, we wanted to selectively copy only the
>> files which I am using..
>> It also helps in some projects to know what is the exact code which make
>> the
>> complete product.
>> Basically I am want to know though javac after it does the job, list of
>> all
>> the classes it generted and from where the source code of that class was
>> found.
>> From the class files, javac could definately know what files were
>> complied
>> by javac even if we consider on demand approach. Many be though this, if
>> ant
>> javac has a way to say what are the sources location.. it would solve my
>> issue.. else I many have write some thing my self :), i.e go though all
>> the
>> generated class, searching for the respective java file in source and src
>> paths etc..
> Ok. The <depends> task contains much of the code to do looks 
> inside .class files to see their imports and so work out which files are 
> out of date (and deletes them)
> But even it has a problem: constant integers and other numbers (maybe 
> strings too) get copied into the .class files. They are not referenced 
> by import.
> You might be able to play with filesets, to select everything in the 
> build/classes directory and use that to create a pattern to copy.
> -- 
> Steve Loughran        
> Author: Ant in Action 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message