ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamie Lawrence <jamie.lawre...@broadcom.ie>
Subject RE: Tricky compile...
Date Mon, 18 Jun 2001 14:09:04 GMT
Yeah, I've been playing about a bit more with this situation.  It appears I
can get it to work if I set the sourcepath to the directory just above the
two sourcedirs (i.e. dev in this picture)

dev/
	src1/
		package1/
			A.java
			B.java
	src2/
		package1/
			A.java
			B.java
 
Then explicitly include src1/package1/A.java and src2/package1/B.java.
However, in the real system there are hundreds of files so it's not really a
viable approach to list them all - I just hadn't realised the compiler would
understand the package structure if the sourcedir was set much further up
the hierarchy.

[Rob van Oostrum just suggested this as I was writing this email]

So I'll probably go with patternsets which define logical modules, copy the
files required for each build based on the patternsets and then perform the
compile :-(

Many thanks for everyone's help,

	Jamie

> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org]
> Sent: 18 June 2001 14:53
> To: ant-user@jakarta.apache.org
> Subject: Re: Tricky compile...
> 
> 
> Jamie Lawrence <jamie.lawrence@broadcom.ie> wrote:
> 
> > Could anyone tell me if the limitation is in javac itself or just
> > the <javac> task?
> 
> You could probably do what you want with commandline javac if you
> don't use -sourcepath, don't include your source directories in the
> -classpath and specify all files that you want to compile on the
> command line.
> 
> <javac>'s srcdir attribute (and <src> elements) are Path's and simply
> make up javac's -sourcepath argument - so you cannot do this here.
> You'd need support for filesets in javac, that don't affect
> -sourcepath - this would be possible but quite difficult to explain
> and document (especially the difference between these new filesets and
> <src>).
> 
> Stefan
> 


Mime
View raw message