My lazy header ...

Ant project AntDoc (file: build.xml)

Initial base directory:
.
Default target:
usage

The Ant buildfile that totally manages the AntDoc project.

AntDoc now supports the project description XML comment!

Main targets

Here comes an overall description of the main targets:

What is needed for a new release

In order not to forget anything when releasing a new version, perform the following steps described below.
  1. Spreading the differences to the XSL

    Only the AntDocXalan.xsl file should have been modified: in order to propagate the modifications to the other XSLs, use the antdoc.xsl.generate target.
  2. Testing

    This is done via the testing Ant buidfiles.
  3. Documentation

    Before completing the technical actions, do not forget to consider the following topics:
    • do not forget to modify the HTML documentation of the AntDoc task,
    • do not forget to update the website via the XML files,
    • do not forget to update the XML release notes
  4. Versioning

    In order to define a new release version for the forthcoming AntDoc delivery:
    • choose and set a version for the new release and update the release date: this is done by modifying the current build.xml Ant buildfile and the Ant ${VERSION} and ${DATE} properties,
    • commit everything under CVS (do not forget to add the newly created resources),
    • set a label under CVS for that release.
  5. Cleaning

    Call antdoc.clean in order to clean-up the generated resource and to force re-compilation from scratch.
  6. Compilation

    Here come the necessary technical steps to take before releasing a new version of AntDoc/AntDocGUI. If you want some finer granularity, use the second method. Otherwise, use the first method.
    1. Either call antdoc.release in order to build all releases (Ant dependant).
      1. Or call antdoc.setup in order to build the distribution setup of AntDoc in one go, or follow the next two steps:
      2. call antdoc.build in order to yield the signed jars of the tool,
      3. call antdoc.setup.build in order to yield the zip distribution of the tool.
      This series of technical actions must be performed both from the V1.4.1 Ant runtime environment, but also from V1.5! This is done via the src\batch\SetAnt<M.m.µ>.bat.
  7. Site generation

    At last, you need to re-generate the web site via the antdoc.website.generate.

    Now, since the generated site uses PHP, you can test the result by executing the antdoc.website.generate.hot, which will hot-deploy this site on the local PHP server.

  8. Web site upload

    At last, you need to upload the web sites (there are two upload locations):

Under development

In order to hot-deploy the current development version of AntDoc, use the antdoc.build.hot target.


Target Summary
Depends
(the depends attribute)
Runtime
(the target executed at runtime)
Description
antdoc.ant.1.4.1.jar.sign
  |
  +--init
init
antdoc.ant.1.4.1.jar.sign
antdoc.ant.1.4.1.jar.sign

Signs the Ant jar files specific to Ant V1.4.1 with Sun certificate.

The saxon.jar and jdom.jar must be present in the Ant lib directory!
antdoc.ant.1.5.jar.sign
  |
  +--init
init
antdoc.ant.1.5.jar.sign
antdoc.ant.1.5.jar.sign

Signs the Ant jar files specific to Ant V1.5 with Sun certificate

The saxon.jar and jdom.jar must be present in the Ant lib directory!
antdoc.ant.jar.sign
  |
  +--antdoc.ant.1.5.jar.sign
    |
    +--init
  |
  +--antdoc.ant.1.4.1.jar.sign
    |
    +--init
init
antdoc.ant.1.4.1.jar.sign
antdoc.ant.1.5.jar.sign
antdoc.ant.jar.sign
antdoc.ant.jar.sign

Signs the non-version-specific Ant jar files with Sun certificate.

The saxon.jar and jdom.jar must be present in the Ant lib directory!
antdoc.antdoc
  |
  +--init
init
antdoc.antdoc
antdoc.antdoc

Tests the Ant AntDoc task.

Generates the HTML stuff in the ${TEMPORARY_ROOT_DIRECTORY_PATH}/antdoc directory.
antdoc.api.document
  |
  +--init
init
antdoc.api.document
antdoc.api.document

Generates the HTML pages that shows the usage of the AntDoc API.

The target requires that Java2HTML j2h.jar V1.3.1+ (http://www.vaegar.f9.co.uk) library be present in Ant library directory.
antdoc.build
  |
  +--antdoc.cab.sign
    |
    +--init
  |
  +--antdoc.cab
    |
    +--init
  |
  +--antdoc.jar
    |
    +--init
  |
  +--antdoc.antdoc.jar.sign
    |
    +--init
  |
  +--antdoc.compile
    |
    +--antdoc.compile.pre
      |
      +--antdoc.compile.properties
        |
        +--init
    |
    +--antdoc.compile.ideaplugin
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.gui
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.core
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.task
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.applet
      |
      +--antdoc.classpath
        |
        +--init
init
antdoc.compile.properties
antdoc.compile.pre
antdoc.classpath
antdoc.compile.applet
antdoc.compile.core
antdoc.compile.gui
antdoc.compile.task
antdoc.compile.ideaplugin
antdoc.compile
antdoc.jar
antdoc.antdoc.jar.sign
antdoc.cab
antdoc.cab.sign
antdoc.build
antdoc.build

Generates AntDoc full distribution and deploys it in situ

The are several things to perform before release a new version. Some concern AntDoc, some other concern AntDocGUI.

AntDoc

  • One of the first thing to do is to check that the AntDoc part works fine with the different versions of the XSLT implementation, i.e. with Saxon V6.2, Saxon V7 and Xalan.
  • One important thing is to check that it works fine with the various versions of Ant from V1.4.1.

AntDocGUI

  • It is important to check that AntDocGUI still integrates properly to Idea from Intellij...
antdoc.build.hot
  |
  +--antdoc.jar
    |
    +--init
  |
  +--antdoc.compile
    |
    +--antdoc.compile.pre
      |
      +--antdoc.compile.properties
        |
        +--init
    |
    +--antdoc.compile.ideaplugin
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.gui
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.core
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.task
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.applet
      |
      +--antdoc.classpath
        |
        +--init
init
antdoc.compile.properties
antdoc.compile.pre
antdoc.classpath
antdoc.compile.applet
antdoc.compile.core
antdoc.compile.gui
antdoc.compile.task
antdoc.compile.ideaplugin
antdoc.compile
antdoc.jar
antdoc.build.hot
antdoc.build.hot

Hot-deploys in situ the latest version of generated AntDoc artifacts.

Use this target under development for hot deployment of the latest version of AntDoc.

The artifacts will not be signed with this target.

antdoc.cab
  |
  +--init
init
antdoc.cab
antdoc.cab

Makes a Microsoft cabinet file of AntDoc.

You need to have installed Microsoft SDK V4.0, and its bin directory to be present in the PATH environment variable in order to execute this target.
antdoc.cab.sign
  |
  +--init
init
antdoc.cab.sign
antdoc.cab.sign

Signs the AntDoc cab file with Microsoft certificate.

See antdoc.cab for the prerequisites, which are the same.
antdoc.classpath
  |
  +--init
init
antdoc.classpath
antdoc.classpath

Defines the paths useful when compiling, running Java classes, generate JavaDoc.

This target enables to centralize where the necessary classpaths are defined. The APPLET_CLASSPATH and FULL_CLASSPATH paths are being defined. The target will fail is some mandatory resources are missing, like some jar libraries.
antdoc.compile
  |
  +--antdoc.compile.pre
    |
    +--antdoc.compile.properties
      |
      +--init
  |
  +--antdoc.compile.ideaplugin
    |
    +--antdoc.classpath
      |
      +--init
  |
  +--antdoc.compile.gui
    |
    +--antdoc.classpath
      |
      +--init
  |
  +--antdoc.compile.core
    |
    +--antdoc.classpath
      |
      +--init
  |
  +--antdoc.compile.task
    |
    +--antdoc.classpath
      |
      +--init
  |
  +--antdoc.compile.applet
    |
    +--antdoc.classpath
      |
      +--init
init
antdoc.compile.properties
antdoc.compile.pre
antdoc.classpath
antdoc.compile.applet
antdoc.compile.core
antdoc.compile.gui
antdoc.compile.task
antdoc.compile.ideaplugin
antdoc.compile
antdoc.compile

Compiles the whole AntDoc source code.

The Ant installation "lib" directory must contain the following extra libraries so that the Java compilation works:
  • log4j-1.2.8.jar,
  • jdom.jar,
  • saxon.jar or xalan.jar,
  • jaxp.jar or xml-apis.jar.
antdoc.compile.applet
  |
  +--antdoc.classpath
    |
    +--init
init
antdoc.classpath
antdoc.compile.applet
antdoc.compile.applet

Compiles the applet for AntDoc.

This target enables to centralize where the necessary classpaths are defined. The APPLET_CLASSPATH and FULL_CLASSPATH paths are being defined. The target will fail is some mandatory resources are missing, like some jar libraries.
antdoc.compile.core
  |
  +--antdoc.classpath
    |
    +--init
init
antdoc.classpath
antdoc.compile.core
antdoc.compile.core

Compiles the core of AntDoc.

antdoc.compile.gui
  |
  +--antdoc.classpath
    |
    +--init
init
antdoc.classpath
antdoc.compile.gui
antdoc.compile.gui

Compiles AntDocGUI source code.

antdoc.compile.ideaplugin
  |
  +--antdoc.classpath
    |
    +--init
init
antdoc.classpath
antdoc.compile.ideaplugin
antdoc.compile.ideaplugin

Compiles the AntDocGUI plugin for IDEA.

antdoc.compile.pre
  |
  +--antdoc.compile.properties
    |
    +--init
init
antdoc.compile.properties
antdoc.compile.pre
antdoc.compile.pre

Prepares the compilation for the AntDoc source code compilation.

antdoc.compile.properties
  |
  +--init
init
antdoc.compile.properties
antdoc.compile.properties

Creates the AntDoc properties file from the pattern one.

antdoc.compile.task
  |
  +--antdoc.classpath
    |
    +--init
init
antdoc.classpath
antdoc.compile.task
antdoc.compile.task

Compiles the AntDoc Ant task.

antdoc.html.manual
  |
  +--antdoc.compile.properties
    |
    +--init
init
antdoc.compile.properties
antdoc.html.manual
antdoc.html.manual

Copies and modifies the HTML AntDoc manual in the temporaray directory.

This target creates the ${TEMPORARY_DIRECTORY_PATH} directory if necessary. It also read the Java ${TEMPORARY_REPLACE_DIRECTORY_PATH}/${ANTDOC_PROPERTIES_FILE} properties file.
antdoc.idea.plugin.deploy
  |
  +--antdoc.jar
    |
    +--init
  |
  +--antdoc.compile
    |
    +--antdoc.compile.pre
      |
      +--antdoc.compile.properties
        |
        +--init
    |
    +--antdoc.compile.ideaplugin
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.gui
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.core
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.task
      |
      +--antdoc.classpath
        |
        +--init
    |
    +--antdoc.compile.applet
      |
      +--antdoc.classpath
        |
        +--init
init
antdoc.compile.properties
antdoc.compile.pre
antdoc.classpath
antdoc.compile.applet
antdoc.compile.core
antdoc.compile.gui
antdoc.compile.task
antdoc.compile.ideaplugin
antdoc.compile
antdoc.jar
antdoc.idea.plugin.deploy
antdoc.idea.plugin.deploy

Deploys the IDEA plugin for AntDocGUI.

antdoc.javadoc
  |
  +--antdoc.classpath
    |
    +--init
init
antdoc.classpath
antdoc.javadoc
antdoc.javadoc

Generates the JavaDoc of the AntDoc/AntDocGUI public API.

Use this target in order to understand how to use AntDoc in your Java code: this should be a good entry point since the code is reasonably well documented.
antdoc.javadoc.antdoc
  |
  +--init
init
antdoc.javadoc.antdoc
antdoc.javadoc.antdoc

Generates the Antdoc documentation of the AntDoc task.

This target uses the AntDoc other project.
antdoc.javadoc.private
  |
  +--antdoc.classpath
    |
    +--init
init
antdoc.classpath
antdoc.javadoc.private
antdoc.javadoc.private

Generates the JavaDoc of the whole project.

This target is dedicated to the developer.
antdoc.javawebstart
  |
  +--antdoc.compile.properties
    |
    +--init
init
antdoc.compile.properties
antdoc.javawebstart
antdoc.javawebstart

Creates the AntDoc JNLP deployment file for Java Web Start.

antdoc.javawebstart.ftp
  |
  +--init
init
antdoc.javawebstart.ftp
antdoc.javawebstart.ftp

Updates the FTP site for AntDoc concerning Java Web Start. AntDoc.jar and the JNLP file are uploaded. Does not generate the jar file nor the JNLP file (you need to invoke antdoc.build and antdoc.antdoc.javawebstart beforehand!

antdoc.jindent
  |
  +--init
init
antdoc.jindent
antdoc.jindent

Beautifies the Java source code

antdoc.jmetra
  |
  +--init
init
antdoc.jmetra
antdoc.jmetra

Generates metrics concerning the Java code

This task requires jmetra.jar from jmetra.
antdoc.package
  |
  +--init
init
antdoc.package
antdoc.package

Creates a stand-alone AntDocGUI package.

See antdoc.cab for the prerequisites, which are the same.
antdoc.release
  |
  +--init
init
antdoc.release
antdoc.release

Builds old AntDoc releases (depending on Ant) from scratch.

This target first cleans the project temporary artifacts, compiles the source code and then makes a setup for distribution.
antdoc.release.ant
  |
  +--init
init
antdoc.release.ant
antdoc.release.ant

Builds a Ant specific AntDoc release from scratch.

The Ant ${ANT_VERSION} property defines the Ant version for which the release must be built.
antdoc.setup
  |
  +--antdoc.setup.build
    |
    +--antdoc.html.manual
      |
      +--antdoc.compile.properties
        |
        +--init
  |
  +--antdoc.build
    |
    +--antdoc.cab.sign
      |
      +--init
    |
    +--antdoc.cab
      |
      +--init
    |
    +--antdoc.jar
      |
      +--init
    |
    +--antdoc.antdoc.jar.sign
      |
      +--init
    |
    +--antdoc.compile
      |
      +--antdoc.compile.pre
        |
        +--antdoc.compile.properties
          |
          +--init
      |
      +--antdoc.compile.ideaplugin
        |
        +--antdoc.classpath
          |
          +--init
      |
      +--antdoc.compile.gui
        |
        +--antdoc.classpath
          |
          +--init
      |
      +--antdoc.compile.core
        |
        +--antdoc.classpath
          |
          +--init
      |
      +--antdoc.compile.task
        |
        +--antdoc.classpath
          |
          +--init
      |
      +--antdoc.compile.applet
        |
        +--antdoc.classpath
          |
          +--init
  |
  +--antdoc.clean
    |
    +--init
init
antdoc.clean
antdoc.compile.properties
antdoc.compile.pre
antdoc.classpath
antdoc.compile.applet
antdoc.compile.core
antdoc.compile.gui
antdoc.compile.task
antdoc.compile.ideaplugin
antdoc.compile
antdoc.jar
antdoc.antdoc.jar.sign
antdoc.cab
antdoc.cab.sign
antdoc.build
antdoc.html.manual
antdoc.setup.build
antdoc.setup
antdoc.setup

Builds the AntDoc distribution setup.

This target first cleans the project temporary artifacts, compiles the source code and then makes a setup for distribution.
antdoc.vizant
  |
  +--init
init
antdoc.vizant
antdoc.vizant

The task that generates graphical targets dependencies of an Ant buildfile

This target has been defined because the three XSL files used by AntDoc only differ by minor things. Those files are:
  • AntDocXalan.xsl: this is the XSL used as a template,
  • AntDoc1.1.xsl: this is the XSL used by Saxon V6,
  • AntDoc2.0.xsl: this is the XSL used by Saxon V7.
The two resulting files are output in the ${TEMPORARY_ROOT_DIRECTORY_PATH} directory.
antdoc.website.example
  |
  +--init
init
antdoc.website.example
antdoc.website.example

Generates some Ant documentation example to put on AntDoc web site

This task uses the ${WEBSITE_GENERATED_DIRECTORY_PATH} property, which is the root directory where the website is being generated.
antdoc.website.generate
  |
  +--antdoc.website.generate.pre
    |
    +--init
  |
  +--antdoc.html.manual
    |
    +--antdoc.compile.properties
      |
      +--init
init
antdoc.website.generate.pre
antdoc.compile.properties
antdoc.html.manual
antdoc.website.generate
antdoc.website.generate

Generates AntDoc website: this is the new way to do it with WedSitor.

The target requires that WedSitor WedSitor.jar (http://wedsitor.free.fr) library be present in Ant library directory. See antdoc.website.generate.pre for other requirements.

This makes a full generation of the AntDoc official web site. The result directory of the generated stuff can be uploaded on internet.

The GENERATE_PHP Ant property is expected and defines whether the generation should be output in PHP or not.

antdoc.website.generate.hot
  |
  +--antdoc.website.generate.pre
    |
    +--init
  |
  +--antdoc.html.manual
    |
    +--antdoc.compile.properties
      |
      +--init
init
antdoc.website.generate.pre
antdoc.compile.properties
antdoc.html.manual
antdoc.website.generate.hot
antdoc.website.generate.hot

Generates AntDoc website and hot-deploys it locally.

This is the same target as antdoc.website.generate, except that the site is hot-deployed under my local PHP server.
Override the Ant ${WWW_ROOT_PATH} property in order to specify in what www directory the generated files should be output.
antdoc.website.generate.html
  |
  +--antdoc.website.generate.pre
    |
    +--init
init
antdoc.website.generate.pre
antdoc.website.generate.html
antdoc.website.generate.html

Generates AntDoc website HTML pages.

This makes a full generation of the AntDoc official web site, but in HTML, and this is why the result of this target execution should be kept private.
antdoc.website.generate.post
  |
  +--init
init
antdoc.website.generate.post
antdoc.website.generate.post

Copies the resources that should be added to the generated site directory.

This task uses the ${WEBSITE_GENERATED_DIRECTORY_PATH} property, which is the root directory where the website is being generated.
antdoc.website.generate.pre
  |
  +--init
init
antdoc.website.generate.pre
antdoc.website.generate.pre

Makes sure that all libraries are being present so as to generate the website.

This task fails is some jar library necessary for the web site generation is missing.
antdoc.website.upload
  |
  +--antdoc.website.upload.http
    |
    +--init
  |
  +--antdoc.website.upload.archive
    |
    +--init
init
antdoc.website.upload.http
antdoc.website.upload.archive
antdoc.website.upload
antdoc.website.upload

Uploads all AntDoc web site stuff.

You must have called antdoc.setup.build if you want AntDoc distribution to have been rebuilt beforehand.
antdoc.website.upload.archive
  |
  +--init
init
antdoc.website.upload.archive
antdoc.website.upload.archive

Uploads the official AntDoc archive web site.

You must have called antdoc.setup.build if you want AntDoc distribution to have been rebuilt beforehand.
antdoc.website.upload.http
  |
  +--init
init
antdoc.website.upload.http
antdoc.website.upload.http

Uploads the official AntDoc HTTP website.

You must have called antdoc.website.generate if you want the website to have been generated beforehand.
antdoc.xsl.generate
  |
  +--init
init
antdoc.xsl.generate
antdoc.xsl.generate

Generates the AntDoc XSL files from AntDocXalan.xsl.

This target has been defined because the three XSL files used by AntDoc only differ by minor things. Those files are:
  • AntDocXalan.xsl: this is the XSL used as a template,
  • AntDoc1.1.xsl: this is the XSL used by Saxon V6,
  • AntDoc2.0.xsl: this is the XSL used by Saxon V7.
The two resulting files are output in the ${TEMPORARY_ROOT_DIRECTORY_PATH} directory.
fail.unless
fail.unless fail.unless

Helper generic target that fails if an Ant property is not defined.

This target has been created just because Ant V1.4.1 does not provide the fail unless attribute facility.

The Ant ${PROPERTY_NAME} is the property being tested, and if not equal to true the ${MESSAGE} message is output and the target fails.

fail.unless.bis
fail.unless.bis fail.unless.bis

Helper target of the 'fail.unless' target.

See fail.unless.
usage
usage usage

Outputs the usage of this buildfile.

This target is aimed at providing a usage of the current Ant buidlfile.
 
Top Property
<property
	location="C:\win32app\Programming\IntelliJ-IDEA-3.0.5"
	name="IDEA_HOME_PATH"
/>
<property
	location="C:\win32app\Programming\jdk1.3.1_07"
	name="JDK1.3_HOME_PATH"
/>
<property
	location="C:\win32app\Programming\j2sdk1.4.2"
	name="JDK1.4_HOME_PATH"
/>
<property
	location="F:\win32app\Programming\EasyPHP\www"
	name="WWW_ROOT_PATH"
/>
 
Target Detail

... is just like my footer!

Edouard Mercier 2003.12.08 20:31:08 - AntDoc V0.8h - XSL Transformer Factory: com.icl.saxon.TransformerFactoryImpl