ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raja Nagendra Kumar <Nagendra.R...@tejasoft.com>
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..

Regards,
Nagendra


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 this..it 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                  http://www.1060.org/blogxter/publish/5
> Author: Ant in Action           http://antbook.org/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/JavaC-and-sourcepath-tp16181099p16274178.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message