ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: file dependencies and sourcepath
Date Thu, 23 May 2002 11:40:09 GMT
Sujan Digumarti wrote:
> Conor i have a problem with that...

And we have a solution for you ...

> using multiple src directories compiles all the files in both the
> directories..
> excluding the files is a solution but what happens is that if the same file
> is present in both the directories you get the duplicate class error.. which
> you must be aware of by now.

I never have that problem. My code always has just one instance of each 
class to be compiled :-) Nevertheless some people do seem to do that ...

> <javac srcdir="b" classpath="c:\a" />
>  where a and b are directories having java files.
> Shouldn't this be addressed as this works fine with the command line version
> of javac.

Try this in 1.5Beta. The sourcepath attribute being set to "" disables the 
sourcepath altogether and javac will then search on the classpath.

     <javac srcdir="a" destdir="classes" sourcepath="">
         <pathelement location="b"/>

So, if you want to search for source on the classpath (doesn't it sound 
strange), you can do that now and achieve behaviour equivalent to the 
commandline javac.


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

View raw message