I have been using ant as patched with Pat's javadoc patch of 3/27--I've got it pretty well road-tested by now on a fairly large project with picky javadoc requirements. It works great and incorporates many much-needed improvements. FWIW, I'd like to recommend that it be merged into the main ant codebase's Javadoc.java in lieu of the patch recently applied.
Thanks. --Scott Scott Came Senior Consultant and Java Developer Puget Sound Systems Group, Inc. Olympia, Washington USA (360) 491-7774 -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 14, 2000 12:44 PM To: [EMAIL PROTECTED] Cc: sam ruby Subject: Re: cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Javadoc.java Sam why do you commit this patch for multiple groups for the javadoc task since it uses a coma separated list ? I already posted such a patch on 3/27. Then there was a discussion in this list about the syntax it should use. And I modified my patch to follow the better syntax implementing these multiple arguments not as attributes of the task but as subelements. I submitted it 5/9, then 5/23. It is a more general patch for javadoc adding: * support for multiple link and linkoffline options * support for multiple group options * support for the @ argument And I'm still working on it: we're using ant as our build tool on my project and I just added support for doclet arguments and maxmemory option. If there is something wrong with my code just tell me. If you just forgot about my postings, I hope you'll consider them now. P@ Hi Ant users and developers, I enhanced the javadoc task in order to make full use of some javadoc features as descibed in http://jakarta.apache.org/bugs/show_bug.cgi?id=64 which means: * support for multiple link and linkoffline options * support for multiple group options * support for the @ argument I submitted such a patch the 3/13 but it used an ugly hack involving a separator to specify multiple arguments. This patch takes into account the input I received from the Ant developers in this list: Stefano Mazzocchi and Sam Ruby. I implemented the link, linkoffline and group arguments not as attributes of the task but as subelements. The new syntax looks like: <javadoc packagenames="com.dummy.test.*" sourcepath="src" destdir="docs/api" author="true" version="true" use="true" windowtitle="Test API" doctitle="<h1>Test</h1>" bottom="<i>Copyright © 2000 Dummy Corp. All Rights Reserved.</i>"/> <linkoffline href="http://java.sun.com/products/jdk/1.2/docs/api/" packagelistLoc="C:\tmp"/> <link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/> <group title="Group 1 Packages" packages="com.dummy.test.a*"/> <group title="Group 2 Packages" packages="com.dummy.test.b*"/> </javadoc> This fixes as well the problem noticed by Scott Came in that list the 3/21. Thus, the syntax for the task changes: I was not able to maintain backward compatibility. If this is an issue, I am open to suggestions about how to maintain it. The issue is: it seems that the attribute names and the entity names should be different (else I get a nullPointerException), so I'll have to change the name of the new options. If this proves to be a problem, and if you vote for it, I can do that. I modified the documentation as well. One question about it: what tool do you use to edit the HTML documentation ? I edited it in Composer, then added the HTML manually in order not to pollute it too much with Composer junk. I hope you'll like this patch. P@ [EMAIL PROTECTED] wrote: > rubys 00/06/14 05:42:15 > > Modified: src/main/org/apache/tools/ant/taskdefs Javadoc.java > Log: > Javadoc 1.2 multiple group support > Submitted by: Donald Leslie <[email protected]> > > Revision Changes Path > 1.8 +24 -2 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java > > Index: Javadoc.java > =================================================================== > RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v > retrieving revision 1.7 > retrieving revision 1.8 > diff -u -r1.7 -r1.8 > --- Javadoc.java 2000/03/03 14:15:42 1.7 > +++ Javadoc.java 2000/06/14 12:42:14 1.8 > @@ -366,10 +366,32 @@ > argList.addElement("-linkoffline"); > argList.addElement(linkoffline); > } > + > + // Javadoc 1.2 rules: > + // Multiple -group args allowed. > + // Each arg includes 3 strings: -group [name] [packagelist]. > + // Elements in [packagelist] are colon-delimited. > + // An element in [packagelist] may end with the * wildcard. > + > + // Ant javadoc task rules for group attribute: > + // Args are comma-delimited. > + // Each arg is 2 space-delimited strings. > + // E.g., group="XSLT_Packages org.apache.xalan.xslt*,XPath_Packages orgapache.xalan.xpath*" > if (group != null) { > - argList.addElement("-group"); > - argList.addElement(group); > + StringTokenizer tok = new StringTokenizer(group, ",", false); > + while (tok.hasMoreTokens()) { > + String grp = tok.nextToken().trim(); > + int space = grp.indexOf(" "); > + if (space > 0){ > + String name = grp.substring(0, space); > + String pkgList = grp.substring(space + 1); > + argList.addElement("-group"); > + argList.addElement(name); > + argList.addElement(pkgList); > + } > + } > } > + > if (stylesheetfile != null) { > argList.addElement("-stylesheetfile"); > argList.addElement(stylesheetfile.getAbsolutePath()); > > > -- Patrick Chanezon, iPlanet Market Maker- Portal/EServices Technical Lead Netscape Communications Corp. - http://people.netscape.com/chanezon/ Opinions are my own. "Two monks were arguing about a flag. One said: `The flag is moving.' The other said: `The wind is moving.' The sixth patriach happened to be passing by. He told them: `Not the wind, not the flag; mind is moving.'" Zen Koan
