You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefano Mazzocchi <st...@apache.org> on 2000/06/20 12:22:58 UTC

Re: ant Javadoc mod

fowarded to the mail list (I don't maintain this task anymore)

Bill Kelly wrote:
> 
> Hi,
>     I see two @authors listed in Javadoc.java, so I'll mail this to both
> of you.
> 
> I wanted to specify several directories in a javadoc task's sourcepath,
> but found that evaluatePackages() treated it as if it were a single
> filename.  I made the following changes, and then I could really specify
> a path:
> 
> *** Javadoc.java        Thu Mar 23 10:14:58 2000
> ---
> /home/bk/tool-ant-2-0-0/src/org/apache/tools/ant/taskdefs/Javadoc.java
> Fri Jun 16 15:26:38 2000
> ***************
> *** 433,442 ****
>        */
>       private void evaluatePackages(String source, Vector packages,
> Vector argLi
> st) {
>           project.log("Parsing source files for packages",
> project.MSG_INFO);
> !         project.log("Source dir = " + source, project.MSG_VERBOSE);
>           project.log("Packages = " + packages, project.MSG_VERBOSE);
> 
> !         Hashtable map = mapClasses(new File(source));
> 
>           Enumeration e = map.keys();
>           while (e.hasMoreElements()) {
> --- 433,447 ----
>        */
>       private void evaluatePackages(String source, Vector packages,
> Vector argLi
> st) {
>           project.log("Parsing source files for packages",
> project.MSG_INFO);
> !         project.log("Source dir(s) = " + source, project.MSG_VERBOSE);
> 
>           project.log("Packages = " + packages, project.MSG_VERBOSE);
> 
> !       // Source is a list according to the ant doc.
> !       // At set, it is standardized to use the system path.separator.
> !         StringTokenizer tok = new StringTokenizer(source,
> System.getProperty("
> path.separator"), false);
> !         while (tok.hasMoreTokens()) {
> !           String sourceDir = tok.nextToken().trim();
> !           Hashtable map = mapClasses(new File(sourceDir));
> 
>             Enumeration e = map.keys();
>             while (e.hasMoreElements()) {
> ***************
> *** 448,453 ****
> --- 453,459 ----
>                     }
>                 }
>             }
> +       }
>       }
> 
>       /**
> 
> I also found the Javadoc task documentation wrong or unclear in several
> points:
> - sourcepath / Specify where to find source files
>     Would be clearer if you added: (list with : or ; classpath-style
> separator)
> - sourcefiles / Space separated list of source files
>     The code actually uses comma as a separator.
> - packagenames / Space separated list of package files (with terminating
> wildcard)
>     The code actually uses comma as a separator.
>     I didn't understand the wildcard feature until I read the code.
> Entries that don't terminate with .* are simply passed to javadoc as
> unflagged args, which is useful to know.  Entries that do are searched
> to build a list of package names: it was not clear to me that this is
> what is referred to by  "only those matching the inclusion rules will be
> passed to the javadoc tool".   Everything else maps directly to a
> javadoc argument, but this feature could be explained more clearly, e.g.
> with an example.
> 
> Thanks for providing the javadoc task...very useful.
> 
> Bill


-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------