ant_ccase

Using HCL VersionVault to audit Jakarta Ant build processes

Applicability

Product

Command type

VersionVault

Data structure

Platform

UNIX®

Linux®

Windows®

Synopsis

ant -listener CCAudits

Description

Jakarta Ant is an open-source build tool for Java. HCL VersionVault includes an optional plug-in for Ant, called CCAudits, that enables HCL VersionVault auditing of Ant builds. The auditing process is started by adding the name of a special Java class, CCAudits, as an argument to the Ant command that starts Ant and a listener process. Note that there is no cleartool command associated with auditing Ant build processes.

Prerequisites

To audit Ant builds, HCL VersionVault must be installed on the client host that is running Jakarta Ant and HCL VersionVault services must be started on that client host.

Note: The Java Development Kit must match the bitness of your VersionVault offering for CCAudits to audit Ant build processes successfully.

To enable audits, you must include the file CCAudits.jar in your CLASSPATH either by updating the CLASSPATH environment variable or by copying CCAudits.jar to the lib directory under the ant directory. The default installation directory for CCAudits.jar is /opt/hcl/ccm/versionvault/java/lib on the UNIX® system and Linux®, and \Program Files\HCL\CCM\VersionVault\bin on Windows®.

To enable audits on the UNIX® system and Linux®, set the appropriate environment variable for your platform, as listed in the following table, to include the HCL VersionVault shlib directory.

Platform Environment variable
Solaris LD_LIBRARY_PATH
Linux® LD_LIBRARY_PATH

By default, the shlib directory is /opt/hcl/ccm/versionvault/shlib.

The build.xml file

Ant uses the file build.xml to specify the parameters of the build. CCAudits does not require any changes to this file, but it does search the file for optional properties. These optional properties are listed in the following table:

Property Action
CCAudits.debug Prints debugging information to the display device.
CCAudits.ccaudits_dir Specifies a directory under the project directory, which contains the project, subproject, and target derived objects.
CCAudits.auditable_task_list Specifies the list of Ant tasks to be audited. For example:

property CCAudits.auditable_task_list ="javac:jar:javah:war:tar" /

You can either add these optional properties to the file build.xml by using the Ant Property task or you can add them to the file CCAudits.properties and include this properties file by using the Ant Property task. For more information, see the Jakarta Ant documentation.

Limitations

CCAudits has the following limitations:

  • The HCL VersionVault configuration records produced when auditing Ant builds are not used to perform build avoidance. For example, the javac task must determine whether a .class output file is up to date with respect to a corresponding .java source file. In this release, file time stamps are used to make that determination.
  • Parallel tasks in Ant run as sequential tasks.
  • Build times may be longer because of the performance overhead associated with auditing and creating configuration records.
  • The Java Development Kit must match the bitness of your VersionVault offering for CCAudits to audit Ant build processes successfully.