InstallAnywhere Ant Task Reference

InstallAnywhere 2017

InstallAnywhere includes an Ant task to build installers from Ant. The InstallAnywhere Ant task (iaant.jar) is located in your InstallAnywhere application folder:

IA_HOME\resource\build\iaant.jar

Tip • To integrate the InstallAnywhere Ant task in an Ant project, set the classpath of the InstallAnywhere Ant task to the location of iaant.jar.

Note • The use of iaant.jar requires Java 1.4 or later.

The following Ant task parameters are available:

Build Parameters
Platform Options
Build Options
Installer Options

Build Parameters

Use the following parameters to control the build process for the InstallAnywhere Ant task.

Build Parameters

Attribute

Description

IAProjectFile

The location of the InstallAnywhere project that you want to build.

This is a required parameter.

IALocation

The location where InstallAnywhere is installed.

This is an optional parameter.

Note • If IALocation is not specified, the task searches for a copy of InstallAnywhere to run against. If InstallAnywhere is not installed in one of the default locations, the task checks the InstallAnywhere product registry for a valid location.

i5OSLogin

The host name, user name and password of an iSeries machine in the following format:

hostname_or_ip/userName/password

For example:

<buildinstaller IAProjectFile="Project_File" IALocation="IA_HOME"

    i5OSLogin="hostname_or_ip/userName/password">

After the project successfully builds, an asterisk-masked i5OSLogin parameter (password portion) prints to the console.

This is an optional parameter.

propertiesfile

The location of a BuildProperties.xml file. If this parameter is used, all other attributes are ignored.

This is an optional parameter.

failOnError

Stop the build process if the command exits with a return code other than 0. Defaults to false.

This is an optional parameter.

Platform Options

Platform options correspond to platform targets on the InstallAnywhere Build Targets tab. By default, the platform options you set in the InstallAnywhere Ant task supersede the corresponding settings in your InstallAnywhere project file and activate or deactivate all targets associated with the platform/VM combination you specify.

Note • Platform options do not activate or deactivate the targets you define in the Ant project’s Configuration section. The InstallAnywhere Ant task will always build the targets you define in the Configurations section regardless of platform options defined here or in the InstallAnywhere project file.

Platform Options

Parameter

Description

BuildLinuxWithVM

True/False

BuildLinuxWithoutVM

True/False

LinuxVMPackLocation

Path

BuildHPUXWithVM

True/False

BuildHPUXWithoutVM

True/False

HPUXVMPackLocation

Path

BuildAIXWithVM

True/False

BuildAIXWithoutVM

True/False

AIXVMPackLocation

Path

BuildSolarisWithVM

True/False

BuildSolarisWithoutVM

True/False

SolarisVMPackLocation

Path

BuildNamedUNIXWithVM

True/False

BuildNamedUNIXWithoutVM

True/False

NamedUNIXVMPackLocation

Path

NamedUNIXTitle

String

BuildWindowsWithVM

True/False

BuildWindowsWithoutVM

True/False

WindowsVMPackLocation

Path

BuildWindows64WithVM

True/False

BuildWindows64WithoutVM

True/False

Windows64VMPackLocation

Path

BuildUNIXAll

True/False

Note • This parameter corresponds with Unix (All)/Generic Unix build target in the Build Installers view on the Build page of the Advanced Designer.

BuildMacOSX

True/False

WantAuthenticationMacOSX

True/False

WantAuthenticationMacOSXShowGUI

True/False

BuildPureJava

True/False

OverrideAllPlatformSettings

True/False

Note • When you set OverrideAllPlatformSettings to True, Ant overrides all the platform settings in the InstallAnywhere project with the platform options provided in the Ant task.

For example, if your InstallAnywhere project targets Windows and Linux systems and your Ant task adds a Mac OS X target (BuildMacOSX="true"), the Ant task builds installers for Windows, Linux, and macOS or OS X. However, if you also set OverrideAllPlatformSettings to True, Ant builds an installer for macOS or OS X only.

Build Options

Build options specify build distribution settings.

Build Options

Parameter

Description

BuildCDROMInstaller

True/False

BuildWebInstaller

True/False

BuildMergeModule

True/False

BuildReadOnlyMergeModule

True/False

BuildWorkdirLocation

Path

Note • BuildWorkdirLocation overrides the default working directory with a relative or full path. (Relative paths are relative to the location of the project file.) Incidentally, the working directory is also the default build output location. If you use both the BuildWorkdirLocation and BuildOutputLocation options, the BuildOutputLocation takes precedence over the working directory for build output.

BuildOutputLocation

Path

OptimizeCDROMInstaller

True/False

OptimizeWebInstaller

True/False

OptimizeMergeModule

True/False

AutoPopulateLabels

True/False

AutoCleanComponents

True/False

Installer Options

Installer options affect the behavior of the installers that the project builds.

Installer Options

Parameter

Description

InstallerStdErrRedirect

Path

InstallerStdOutRedirect

Path

InstallerValidVMList

String

InstallerInitialHeapSize

Int

InstallerMaxHeapSize

Int

UNIXDefaultUI

Silent/Console/GUI

WindowsDefaultUI

Silent/Console/GUI

Windows64DefaultUI

Silent/Console/GUI

Note • In order to redirect InstallAnywhere’s build process output to Ant’s log, you must specify a redirector as described in the Ant documentation (Exec task). For information about using Ant, see http://ant.apache.org/manual/.

Build Configurations

Build configurations support InstallAnywhere projects that include multiple build targets for the same platform but use different VMs. Each target in a build configuration identifies a build target to add to those that already exist in the InstallAnywhere project file. Ant always builds the targets that you define in the InstallAnywhere Ant task’s Configuration section.

Configuration Elements and Attributes

Tag

Description

configuration

Contains targets that append additional build targets to those already defined in the InstallAnywhere project file.

Attributes

The following are attributes of the configuration element:

name—Name of the build configuration to build.
webenabled—True/False.
weboptimize—True/False.
webpagelanguage—en/ja.
cdenabled—True/False.
cdoptimize—True/False.
mergeenabled—True/False.
mergeoptimize—True/False.
mergereadonly—True/False.

locales

Contains targets that append additional build targets to those already defined in the InstallAnywhere project file.

Nested Element(s)

The following are nested element(s) of the locales element:

localeSuffix—Set to en/ja/de/fr/ar… any of 31 available run-time locales.

target

Contains the settings to define a single build target. Targets must include a platform setting.

Attributes of target Element

The following are attributes of the target element:

platform—Specifies the target platform. Available values are windows, linux, macosx, solaris, aix, hpux, unix, unixwithvm, and java.
buildWithNoVM—Indicates whether this target includes a bundled VM. Use true to build an installer without a bundled VM; otherwise, use false.
buildWithVM—Indicates whether this target includes a bundled VM. Use true to build an installer with a bundled VM; otherwise, use false.
bundledVM—Specifies the VM to bundle with the installer.
outputDir—Specifies the name of the build output directory.

See Also