You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jessica Tsou <je...@gammacomputer.com> on 2000/11/09 03:29:51 UTC
include and exclude files
To whom it may concern,
I would like to know more about include and exclude files in "java".
The documentation that I've read through so far has not been helpful.
All the changes that I've included in the mol file didn't seem to have taken
place:
<target name="compile wrapper" depends="prepare">
<!-- Compile the java code from ${sac} into ${build} -->
<java scrim="${wrapper}" bestir="${wrapper}" class path="${path}"
excludes="test. exclude"/>
</target>
where test. exclude looks like:
$ more test. exclude
**/test*.java
Could it be that I placed this like in the wrong directory?
Also, is it possible to compile one file at a time in a given directory:
Ex.
/directory
files1.java
files2.java
files3.java
files4.java
I would like to compile "file3.java" first, then "file4.java" then the rest
of the java files.
I think the default for "java" is to compile from java1.java and on.
Thank You!
Jessica
Re: include and exclude files
Posted by Stefan Bodewig <bo...@bost.de>.
Jessica Tsou <je...@gammacomputer.com> wrote:
> <target name="compile wrapper" depends="prepare">
> <!-- Compile the java code from ${sac} into ${build} -->
> <java scrim="${wrapper}" bestir="${wrapper}"
> class path="${path}" excludes="test. exclude"/>
> </target>
I hope, in reality it reads
<javac scrdir="${wrapper}" destdir="${wrapper}"
classpath="${path}" excludes="test. exclude"/>
Diane already pointed you to using excludesfile instead of excludes.
> Also, is it possible to compile one file at a time in a given
> directory: Ex. /directory files1.java files2.java files3.java
> files4.java
> I would like to compile "file3.java" first, then "file4.java" then
> the rest of the java files.
Yes and no.
<javac includes="**/file3.java" />
<javac includes="**/file4.java" />
<javac>
will do, but only if file3.java doesn't depend on any of the other
files (in which case the needed classes will be compiled as well).
> I think the default for "java" is to compile from java1.java and on.
No, the default for *javac* is to compile all four of them at the same
time.
Stefan