Ant Support

The OVF Toolkit includes Ant support for both the Eclipse and java runtime environments in the com.ibm.adt.model plugin/classlib.

The OVF Ant support depends on Ant version 1.7 or later

Eclipse Runtime Support

When the com.ibm.adt.model plugin is installed in an eclipse platform, additional tasks are automatically made available to Ant scripts. You can find them in the preferences dialog (Windows/Preferences) on the Ant/Runtime/Tasks page.

Note that to run the built-in Ant tasks for OVF, you need to select the "Run in the same JRE as the workspace" option in the external tool configuration for your build. Otherwise, you will get an error complaining that Ant could not find the task.

Java Runtime Support

For the Java runtime environment, as opposed to the Eclipse runtime environment, you only need to add the com.ibm.adt.model class library to the classpath. Ant will discover the tasks, etc., in this library by reading the embedded org/apache/tools/ant/taskdefs/default.properties file.

Ant Tasks

The following sections provide details for the Ant tasks.

ovf.exportPackage

The ovf.exportPackage task creates an OVF package with options to produce a manifest, provide a digital signature and select an output format.
Parameters
Attribute Description Required
 bufferSize  Integer for the output buffersize, default is 1M  No
 certificate  Certificate file  Yes, if the package is to be signed
 digests  Boolean to specify whether message digests are to be generated  Yes, if package is to be signed (certificate and privateKey are specified)
 failOnError Boolean to indicate whether the task fails, including whether the OVF descriptor contains any errors.  No
inputOVF File reference to the input OVF file Yes
 outputDirectory  Directory where the output package is written  Yes
ova Boolean to indicate the output is in the single-file archive format. If not specified or false, the output is the set-of-files format. No
overwrite Boolean to indicate whether any existing files in the outputDirectory are allowed to be overwritten. No
privateKey Private key file for signing the package. Yes, if the package is to be signed.
verbose If true, additional progress messages are echoed. No

ovf.importPackage

The ovf.importPackage task processes an OVF package to extract the artifacts and verify the contents when the package contains digests or a digital signature.
Parameters
Attribute Description Required
 bufferSize  Integer for the input buffersize, default is 1M  No
 failOnError Boolean to indicate whether the task fails  No
inputOVA File reference to the input OVA file Yes
 outputDirectory  Directory where the package contents are extracted  Yes
overwrite Boolean to indicate whether any existing files in the outputDirectory are allowed to be overwritten. No
verbose If true, additional progress messages are echoed. No

ovf.validateEnvelope

The ovf.validateEnvelope task performs validation checks on an OVF envelope.
Parameters
Attribute Description Required
 failOnError Boolean to indicate whether the task fails when validation errors are encountered  No
inputOVF File reference to the input OVF file Yes
verbose If true, individual diagnostics are echoed. No