Friday, February 4, 2011

Using ANT to create javadocs

Here is a very simple example to create javadocs using ANT. The fields should be replaced with your own parameters e.g. packagename should be replaced by the name of the package that contains the classes that you want to create javadocs for.

<target name="document">
  <javadoc destdir="doc" author="true" version="true" use="true" windowtitle="My JavaDocs">
    <fileset dir="src" defaultexcludes="yes">
      <include name="packagename/**">
      </include>

      <classpath>
        <fileset dir="lib">
          <include name="**/*.jar">           </include>
        </fileset>
        <doctitle><!--[CDATA[<h1>Mobile Text Adverts</h1>]]--></doctitle>
        <bottom><!--[CDATA[<i>Copyright &#169; 2011 Company Name. All Rights Reserved.</i>]]--></bottom>
      </classpath>

    </fileset>
  </javadoc>
</target>

No comments:

Post a Comment