ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: javac task problem in Java 6
Date Tue, 04 Nov 2008 11:36:33 GMT
On Tue, 4 Nov 2008, Sergey Bondarenko <> wrote:

> Regarding compilation issue, it looks like Ant javac task does not
> handle "includes" and "excludes" attributes correctly when it is
> used with JDK 6.  But it works properly with JDK 5.

Uhm, no.

includes/excludes controls which source files are being sent to
javac's command line.  If javac decides that it needs to compile
additional classes that it can find inside the source path, then there
is nothing that Ant can do.

Inside the manual page for the javac task you will find (under

| If you wish to compile only files explicitly specified and disable
| javac's default searching mechanism then you can unset the sourcepath
| attribute:
|   <javac sourcepath="" srcdir="${src}"
|          destdir="${build}" >
|     <include name="**/*.java"/>
|     <exclude name="**/"/>
|   </javac>
| That way the javac will compile all java source files under "${src}"
| directory but skip the examples. The compiler will even produce errors
| if some of the non-example files refers to them.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message