ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jhair Tocancipa Triana <>
Subject ResourceUtils.selectOutOfDateSources: ant rebuilds class file again?
Date Wed, 28 Jun 2006 14:38:17 GMT
[My apologies if this question is more appropiate for the users
list. I tested the following with sources from the SVN repository].

Please consider the test case below:

$ tar tvzf ant_test_case.tgz 
-rw-r--r-- user/users 257 2006-06-28 15:25:01 build.xml
drwxr-xr-x user/users   0 2006-06-28 15:40:48 src/com/
drwxr-xr-x user/users   0 2006-06-28 15:40:56 src/com/icon/
drwxr-xr-x user/users   0 2006-06-28 15:37:07 src/com/icon/common/
-rw-r--r-- user/users 149 2006-06-28 15:35:42 src/com/icon/common/

When I run ant over this dummy example more than once, the
classes/com/icon/common/TestAnt.class is generated everytime again --
it shouldn't if the file hasn't been modified.

ant -verbose says the following:

    [javac] added as TestAnt.class doesn't exist.

The file classes/com/icon/common/TestAnt.class exists though.

I don't know much about ant internals, but I am interested to
learn. So I tried to debug this to see why this was happening. I set a
breakpoint in

main[1] print granularity
 granularity = 1000
main[1] print sr
 sr = ""
main[1] print r
 r = "<directory>/classes/TestAnt.class"

Since <directory>/classes/TestAnt.class does not exist, the file is compiled again.

On the other hand the file


*does* exist.

Why does ant look for the .class file in the "wrong" directory
(i.e. classes instead classes/com/icon/common)?

Thanks in advance for your help,


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

View raw message