ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sujan Digumarti <Sujan.Diguma...@india.techspan.com>
Subject RE: file dependencies and sourcepath
Date Thu, 23 May 2002 07:19:49 GMT
Conor i have a problem with that...
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.

so if you use the exclude on this file , both the instances get excluded ..
as javac doesnt support filesets there is no way of including just one
particular instance of this file.

<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.

Rgds,
Sujan

-----Original Message-----
From: Conor MacNeill [mailto:conor@cortexebusiness.com.au]
Sent: Thursday, May 23, 2002 12:46 PM
To: Ant Users List
Subject: Re: file dependencies and sourcepath


Cristian,

Use multiple source paths via <src> elements

<javac>
   <src dir="a"/>
   <src dir="b"/>
</javac>

Once you have that working, then you might think about why you are not 
using packages :-)

Conor


Cristian Caprar wrote:
> Hi everybody.
> 
> In short: I have folders a and b, a contains a.java (no package), b
contains
> b.java (again no package). class a depends on class b. I try to compile
the
> module for a ( b is in another module). Even if I put b in the classpath
of
> javac task in and build.xml when compiling module for a, it complains that
> it can't find the definition for b. If i compile b.java and the class is
> there, then it works.
> 
> The interesting part is that trying to run javac directly from the command
> line (to compile a.java) and placing b in the classpath argument works
> perfectly.
> 
> Do you have any more ideas about the problem? Maybe I can get a solution.
> 
> Thanks and regards,
> Cristian
> iQuest (www.iquestint.com)
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 



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

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


Mime
View raw message