ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesse Tilly <>
Subject RE: Javac
Date Fri, 20 Oct 2000 18:41:08 GMT

I'm not sure what you're trying to achieve, but this isn't an ANT
limitation, this is a result of object definitions within Java and thus
within Java compilers.

Even if you explicitly stated taht must be compiled, unless the
class file already existed, any code module referred to would be
compiled as well.  The compilers perform of sort of automatic dependency
checking.  It isn't smart and it isn't all inclusive.  javac only goes one
deep, but that is per file, so that usually catches a lot of files without
you knowing.  For example, has a field file2, has a
field file3 and has a field file1.  Compiling any one of these
files will cause the other two to be compiled.  

Could you expound on your goal?


-----Original Message-----
From: Dan MacKay [mailto:dan.mackay@KINGSTON.HUMMINGBIRD.COM]
Sent: Friday, October 20, 2000 2:43 PM
Subject: Javac

Hi all,

Is it possible to have javac not compile a whole tree. I have to control the
the order of compilation. My directory structure is as follows:

root directory:

                        many files *.java

                        many files *.java

                        many files *.java

I have to compile and stage these files at different points through the
build process. I have to start at the root and compile the two files there
to the exclusion of the rest of the files in the resident sub-directories.
My initial niave attempt was as follows:

  <target name="compile"  depends="getSource" >
  <!-- Build the root -->
    <echo message="Building the root"/>
    <javac optimize="${optimize}"

This blithly motors along and compiles the whole shebang, sub-directories
included and eventually fails in the sub_dir1 build when it cannot find
dependancies for resources have not been found because they have not been
staged yet. Could someone give me an example of the includes/exclude
directives that would be necessary to ensure that only and are compiled?



View raw message