You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Richard Landon <RL...@youbet.com> on 2000/08/17 21:35:28 UTC

RE: Ant dependency evaluation (NT platform): class files are alwa ys out of date?

Peter,

Call me dense but I'm still a tad confused. Perhaps you can claify.

For this to work, do I have to place my ANT build file instrumentation
files one level above my source tree? For example, should my build.xml
build.sh
files be in, say a base (C:/Stuff/build.xml for example) and my sources in
(C:/Stuff/Src/**.java)?

When I tried the changes you suggested to javac. No files are ever out of
date, which
means nothing gets compiled ever.

I probably misunderstand the statement:

"make a new directory src and then point your source to that"

(I don't want a C:/Stuff/Src/build.xml with a C:/Stuff/Src/Src/**.java as
that seems confusing so it seems I need to relocate build.xml and etc one
level
downward into C:/Stuff? and then point to ./src with srcdir and include
com/**.java?)

Again, thanks for the help, I figure this out someday.


-----Original Message-----
From: Richard Landon [mailto:RLandon@youbet.com]
Sent: Wednesday, August 16, 2000 10:59 AM
To: ant-user@jakarta.apache.org
Subject: RE: Ant dependency evaluation (NT platform): class files are
alwa ys out of date?


I'll give it a spin.

BTW, thanks for the help. I must say you ant guys are really responsive.
I wish some of our system vendors (J2EE servers and stuff) where as 
responsive as you guys (and gosh, we actually PAY them!)

-----Original Message-----
From: Peter Donald [mailto:donaldp@mad.scientist.com]
Sent: Wednesday, August 16, 2000 6:04 AM
To: ant-user@jakarta.apache.org
Subject: RE: Ant dependency evaluation (NT platform): class files are
always out of date?


At 01:07  15/8/00 -0700, you wrote:
>Wow, thanks. 
>
>I have attached the build.xml, the script that drives it (build.sh), a
>script I use
>to force a complete rebuild (rebuild.sh), and a log of the output
>(build.log).
>
>I'm sure its something stupid I've done

not stupid - just something that ant likes you to do differently :P.

What I would do is make a new directory src and then point your source to
that. Currently you point to the com subdirectory in source directory. ie
change it to look like

<javac 
   srcdir="src/" 
   destdir="${ewager.classbindir}" 
   classpath="${ewager.classpath}" 
   excludes="**/*.scc,**/*.sh,**/*.org" 
   includes="com/**.java" 
   debug="on" 
   deprecation="on" /> 


The reason is that Ant scans the source directory to check dependancies.
How ever you point the sourcedirectory to com. So when it parses one of
your files 
say com/youbet/ewager/util/ExceptionUtils.java
it will read the package as "com.youbet.ewager.util". 
then it will look for a file named ExceptionUtils.java in correct directory.

as you set sourcedirectory as ./com it will look for
./com/com/youbet/ewager/util/ExceptionUtils.java

which doesn't exists - so it will think it has to rebuil;d it again.

Hope that helps :P


Cheers,

Pete

*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power."          |
|       -Abraham Lincoln                               |
*------------------------------------------------------*