Hi Prashant, I had executed ANT in verbose and debug mode and it shows
[javac] HelloWorlApp.java added as HelloWorlApp.class doesn't exist. Whereas the class file exist in dest dir. I tried adding/deleting dest dir in classpath, but no luck in both the situation. I would appreciate, If you could try this in your environment. I had tried this with ANT 1.6.5/1.7 and java 1.4/1.5. P.S: Other member's can also suggest me something. Thanks, -----Original Message----- From: Prashant Reddy [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 26, 2007 5:41 PM To: Ant Users List Subject: RE: Javac task query Humm.. May be you could try running ANT in verbose mode, see why ANT thinks it should compile .java files that are not modified. Also, I think the destination dir the classes are directed to is automatically added to classpath by ANT. So you may not need this : > <fileset dir="${dest}" > includes="**/*.*"/> > </classpath> HTH On Tue, 2007-06-26 at 17:24 +0800, Yadav, Akshat Kumar wrote: > Thanks Prashant for reply. > > I had gone through this link earlier, my source dir structure mirrors > package dir structure. Even I tried to put the source and dest dir as > single dir. > > <project name="Ant " default="compile" basedir="."> <property > name="src" value="C:\Documents and Settings\ay03416\My > Documents\RanD\ant\src"/> <property name="dest" value="C:\Documents > and Settings\ay03416\My Documents\RanD\ant\dest" /> <property > name="lib" value="C:\Documents and Settings\ay03416\My > Documents\RanD\ant\lib" /> > > <target name="compile"> > <javac srcdir="${src}" destdir="${dest}" > deprecation="no" debug="on" listfiles="yes"> > <classpath> > <fileset dir="${lib}" > includes="**/*.jar **/*.zip"/> > <fileset dir="${dest}" > includes="**/*.*"/> > </classpath> > </javac> > </target> > </project> > > Any suggestion's welcome... Also, I had gone to following links, but > no luck for me :( > > http://mail-archives.apache.org/mod_mbox/ant-user/200111.mbox/%3cKCEIJ > FM [EMAIL PROTECTED] > http://article.gmane.org/gmane.comp.jakarta.ant.user/42524 > http://marc.info/?l=ant-user&m=97303040120654&w=2 > http://dev.eclipse.org/newslists/news.eclipse.tools.jdt/msg01615.html > http://mail-archives.apache.org/mod_mbox/ant-user/200009.mbox/%3cNDBBI > MH [EMAIL PROTECTED] > https://issues.apache.org/struts/browse/STR-2403 > > Thanks, > > -----Original Message----- > From: Prashant Reddy [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 26, 2007 5:17 PM > To: Ant Users List > Subject: Re: Javac task query > > Please see : > http://ant.apache.org/faq.html#always-recompiles > > HTH > > On Tue, 2007-06-26 at 16:15 +0800, Yadav, Akshat Kumar wrote: > > Hi All, > > > > Ant manual says "The source and destination directory will be > > recursively scanned for Java source files to compile. Only Java > > files that have no corresponding .class file or where the class file > > is older than the .java file will be compiled." > > > > Reference: http://ant.apache.org/manual/CoreTasks/javac.html > > > > But, when I compile my java files through using ANT javav task, all > > files gets compiled every time. Rather, I want it to compile only > > those files that have no corresponding .class file or where the > > class file is older than the .java file. > > > > Code: > > > > <target name="compile"> > > <javac srcdir="${src}" destdir="${dest}" > > deprecation="no" debug="on" listfiles="yes"> > > <classpath> > > <fileset dir="${lib}" > > includes="**/*.jar **/*.zip"/> > > <fileset dir="${dest}" > > includes="**/*.*"/> > > </classpath> > > </javac> > > </target> > > > > Let me know what I am missing... > > > > Thanks, > > > > -------------------------------------------------------------------- > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For > > additional > > > commands, e-mail: [EMAIL PROTECTED] -- -Prashant Don't upload, just share : www.dekoh.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]