ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Filesets
Date Wed, 08 Nov 2000 08:32:57 GMT
>>>>> "WF" == William Ferguson <> writes:

 WF> OK, I guess I'm doing something really dumb, so I guess you guys
 WF> will spot it quickly ..

Not dumb at all, just something that is not possible to do,

 WF> I am attempting to use a path like structure to specify the
 WF> sourcepath for the Javadoc task.  I was doing this so I could
 WF> exclude some classes using the exclude property of a fileset.

Whatever you specify as <sourcepath> elements, will be passed to
javadoc's (the command) -sourcepath (JDK 1.2+) or -classpath (JDK 1.1).

Furthermore Ant will use it to create the list of packages packages
you want your javadocs for (when you've used the .* abbreviation for
package names).

So we have two problems here:

(1) Ant will always create a list of packages, not a list of classes
you want javadocs for. This means you cannot exclude single classes,
only complete packages. No workaround at all, sorry.

(2) What 

 WF> <sourcepath > 
 WF>   <fileset dir="${build.src}" > 
 WF>     <include name="**/**" />
 WF>   </fileset>
 WF> </sourcepath>

actually does for javadoc (the command) is adding every single file
below ${build.src} to the classpath (or sourcepath). 

Just like the JVM itself, javadoc doesn't know what to do with this. A
CLASSPATH holds directories or archives. Therefore you still need to
point javadoc to ${build.src} directly.


View raw message