ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <zod...@holoweb.net>
Subject Re: javac task: referencing dependent classes
Date Wed, 18 Sep 2002 00:44:15 GMT
The javac task works by calling javac so it's behaviour should be the same.
Check that your Ant build file is setting up the classpath correctly and you
shold be fine.

L.

On 9/17/02 6:38 PM, "Daniel L. Boxwell" <BoxwellDL@C-IV.org> wrote:

> I have run into a problem using the javac task in both ANT 1.4.1 and 1.5 using
> both jdk1.3.1  and jdk1.4. It seems as though the ANT javac task is unable to
> include files in the classpath unless they are already compiled.
> 
> When running javac from the command line, it is possible to include
> directories in the classpath that contain uncompiled source (.java) files.
> Let's say that the file I am trying to compile with javac depends on one of
> these referenced .java files. javac.exe has no trouble compiling the dependent
> files and then building the original target.
> 
> The ANT javac task; however, is unable to reference files in this manner. The
> dependent files MUST be compiled in advance. This becomes a problem when
> trying to deal with circular dependencies within your build. I have included
> the simplest of examples in the attached zip file. See how the .bat file that
> calls javac has no trouble - then delete the generated class files and try the
> ant build. If you leave the generated files, then ant has no problem!!
> 
> This is a simple example, but my problem is much larger: I have a large
> development team - each with their own jar file. In the end I want to build
> all of the jars at once using a separate invocation of javac, but dependencies
> will make this difficult. It would be nice to include all the various src
> directories in the classpath of each javac invocation so javac will just hunt
> for the dependent files itself.
> 
> If anybody has a better solution to my problem, I am willing to entertain it,
> but it seems to me that the javac task should work the same way as javac does.
> 
> Thanks in advance,
> 
> --Dan
> 
> 
> --
> 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