ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@m64.com>
Subject RE: Newbie Question
Date Sun, 24 Sep 2000 09:24:48 GMT
Jason,


> -----Original Message-----
> From: J Kary [mailto:jkary_98@yahoo.com]
> Sent: Sunday, 24 September 2000 6:01
> To: ANT MAILING LIST
> Subject: Newbie Question
>
>
> app/corefile1.java
> app/corefile2.java
> app/pkg1/file1.java
> app/pkg1/file2.java
>
>
> How do I tell ANT to just build the core files?  Does ANT take care of
> depends like:

Add an include element to the javac task like this
     <javac srcdir="app" destdir="build">
       <include name="*.java"/>
     </javac>

This will only include those files in the unnamed package.

>
> corefile1.java depends on pkg1/file1.java  AND
> pkg1/file1.java depends on corefile1.java
>
> In the above case you need to do a 'javac corefile1.java
> pkg1/file1.java
> '

ant won't take care of it but the underlying compiler used by ant should. By
that I mean the compiler will find pkg1/file.java when compiling
corefile1.java and compile it if necessary. It will not, however,
necessarily recompile corefile1.java if pkg1/file.java is updated.

I should also add that the Java language spec does not encourage the use of
the unamed package.

"Unnamed packages are provided by the Java platform principally for
convenience when developing small or temporary applications or when just
beginning development. "

Good Luck
Conor


Mime
View raw message