Publishing

Publishing PageSeeder data to print, the Web or both

Task xmljavadoc

This task can be used to generate the Java documentation using the javadoc tool into a set of PageSeeder documents.

Warning!

This Ant task is still experimental and its API is subject to change!

You can download the jar file to use Ant extension from the download area .

Definition

Minimal definition:

<xmljavadoc 
sourcepath="[source]" 
docletpath="[library]"/>

 Full definition:

<xmljavadoc 
sourcepath="[source]"
            
docletpath="[library]"
            destdir="[destination]"
            working="[working-directory]"
            multiple="[on|off]"
            templates="[xslt]"
            docencoding="[charset]"
            extends="[baseclass]" 
            implements="[interface]"
            annotated="[annotation]"
            tagset="[pageseeder|berlioz]">
  <classpath> ... </classpath>
  <tag name="[name]" />
</xmljavadoc>

Attributes

AttributeDescriptionRequired
sourcepathThe path source to the Java source files.Yes
docletpathThe path to the Jar file containing the doclet (the jar for this task)

This is required as the javadoc path must be run as a separate process.
Yes
destdirThe destination folder.Yes
workingThe directory holding temporary files such as interim XML javadoc format.No
multipleSpecify whether the output should be all in one file or in multiple files.No
templatesAn XSLT stylesheet to use to process the interim format into PageSeeder XML.
If unspecified, no transformation will be made.
No
docencodingThe charset to use for the output files.
Defaults to utf-8.
No
filenamecolumnThe number of the column to use as a filename when splitting files by row.
 
No
extendsThe base class that sources to document must extend.No
implementsThe interface that sources to document must implement.No
annotatedThe annotation that sources to document must have.No 
tagsetThe set of tags that the doclet should includeNo

Usage

Invoking in Ant

This task is not included by default in the PageSeeder publisher and must be specified using the <taskdef/> . 

<project ... xmlns:psj="antlib:com.pageseeder.ant.javadoc">

  <!-- Define the task in ANT -->
  <taskdef uri="antlib:com.pageseeder.ant.javadoc" 
     classpath="ps-ant-javadoc-0.6.0.jar"/>

  <target ... >
    <!-- Invoke Task -->
    <psj:xmljavadoc sourcepath="java/src" destdir="psml"
                    docletpath="ps-ant-javadoc-0.6.0.jar"/>
  </target>
</project>

Using a namespace is not required, but it is a good mechanism to know the origin of the task.  Recommended namespace is 'psj'.

Standalone

It is designed to work as standalone. It is possible to invoke this task without being to connected to PageSeeder.

Typically this task would be used in the context of a PageSeeder upload. In that case, use the upload task to upload the generated file into PageSeeder.

How does it work?

This Ant task will:

  1. Run the javadoc tool with the Weborganic XML Doclet (in [working])
  2. Generate the Javadoc XML on qualified source files.
  3. Convert the Javadoc XML into PageSeeder XML using the specified templates

Javadoc XML

The Javadoc XML is a basic representation of the javadoc information in XML.

 Javadoc XML

TO DO

Limitations

TO DO

Created on , last edited on