Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems with ExcludeDoclet and Ant

843810Feb 23 2005 — edited Mar 3 2005
Greetings.

I've been trying to use the ExcludeDoclet (http://java.sun.com/j2se/javadoc/excludedoclet/index.jsp)
to generate docs for the classes that aren't excluded. My ant task looks like this:
<target name="javadoc" depends="init" 
        description="Build the javadoc in genericized form">
  <delete dir="${javadocdir}"/>
  <mkdir  dir="${javadocdir}"/>
  <javadoc packagenames="net.sf.jga.*,net.sf.jga.fn.*"
           sourcepathref="project.sourcepath"
           source="1.5"
           defaultexcludes="yes"
           destdir="${javadocdir}"
           version="true"
           overview="${basedir}/src/overview.html"
           windowtitle="jga: Java Generic Algorithms">
    <doctitle><![CDATA[<h1>jga: Generic Algorithms for Java</h1>]]></doctitle>
    <bottom><![CDATA[<i>Copyright � 2002-2005  David A. Hall. All Rights Reserved.</i>]]>
    </bottom>
    <classpath>
      <pathelement path="${jnlp.api}"/>
      <path refid="project.classpath"/> 
    </classpath>
    <doclet name="tools.ExcludeDoclet" path=".">
        <param name="-excludefile" value="visitors.txt"/>
     </doclet>
   </javadoc>
  <jar jarfile="${javadocjar}" basedir="${javadocdir}"/>
</target>
I've also tried the form where the doclet information is passed as attributes of the javadoc tag, and I've tried skipping ant by building a shell script with the same collection of arguments. In all cases, I get output indicating that the ExcludeDoclet has successfully read the file, processed the list of classes in the indicated packages, and removed those from the visitors.txt file. It appears, however, that once the excluded list of source files has been procesed, javadoc exits without processing the remaining files.
javadoc:
   [delete] Deleting directory /home/dave/projects/jga/doc/javadoc
   [delete] Deleting directory /home/dave/projects/jga/doc/javadoc
    [mkdir] Created dir: /home/dave/projects/jga/doc/javadoc
  [javadoc] Generating Javadoc
  [javadoc] Executing '/opt/jdk1.5.0/bin/javadoc' with arguments:
  [javadoc] '-d'
  [javadoc] '/home/dave/projects/jga/doc/javadoc'
  [javadoc] '-overview'
  [javadoc] '/home/dave/projects/jga/src/overview.html'
  [javadoc] '-windowtitle'
  [javadoc] 'jga: Java Generic Algorithms'
  [javadoc] '-doctitle'
  [javadoc] '<h1>jga: Generic Algorithms for Java</h1>'
  [javadoc] '-bottom'
  [javadoc] '<i>Copyright � 2002-2005  David A. Hall. All Rights Reserved.</i>
  [javadoc]     '
  [javadoc] '-classpath'
  [javadoc] '/opt/jdk1.5.0/sample/jnlp/servlet/jnlp.jar:...'
  [javadoc] '-sourcepath'
  [javadoc] '/home/dave/projects/jga/src:/home/dave/projects/jga/build/src'
  [javadoc] '-doclet'
  [javadoc] 'tools.ExcludeDoclet'
  [javadoc] '-docletpath'
  [javadoc] '/home/dave/projects/jga:/opt/ant/lib/ant-launcher.jar:...'
  [javadoc] '-excludefile'
  [javadoc] 'visitors.txt'
  [javadoc] '-source'
  [javadoc] '1.5'
  [javadoc] 'net.sf.jga.fn'
...
  [javadoc] 'net.sf.jga.util'
  [javadoc] 'net.sf.jga.parser'
  [javadoc] 
  [javadoc] The ' characters around the executable and arguments are
  [javadoc] not part of the command.
  [javadoc] Javadoc execution
  [javadoc] Loading source files for package net.sf.jga.fn...
...
  [javadoc] Loading source files for package net.sf.jga.util...
  [javadoc] Loading source files for package net.sf.jga.parser...
  [javadoc] Constructing Javadoc information...


  [javadoc] Removing excluded source files.......


  [javadoc] Excluding net.sf.jga.fn.adaptor.OrBinary.Visitor
  [javadoc] Excluding net.sf.jga.fn.adaptor.OrUnary.Visitor
...
  [javadoc] Excluding net.sf.jga.fn.string.DefaultFormat.Visitor
  [javadoc] Excluding net.sf.jga.fn.string.Match.Visitor
Does anyone have any ideas how I can get this to work?

Dave Hall
http://jga.sf.net/
http://jroller.com/page/dhall/
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2005
Added on Feb 23 2005
6 comments
477 views