Using the Dimensions Ant Task

To run Dimensions command-lines in a target, add an element similar to the following to your Ant build.xml script:

<dimensions userID="builduser" password="oH.1x!@46nL"

database="DEV@PROD" server="prod1">

<run cmd=

/directory="java_build"

/user_dir="C:\Workspaces\CM_FUTURE"

</dimensions>

You must be careful with the following characters in command-lines as they may need to be escaped:

Character | Description | Escaped as
" | Double-quotation. You only need to escape a double-quotation if the characters that enclose it are the same, for example: Escape not required: Escape required: | &quot;
| Single quotation mark. You only need to escape a single quotation mark if the characters that enclose it are the same, for example: Escape not required: Escape required: | &apos;
& | Ampersand | &amp;
< | Less-than | &lt;
> | Greater-than | &gt;

If you use a single quotation mark to quote around the cmd attribute you normally only need to escape the following characters:

"

&

<

If you use a double quotation mark to quote around the cmd attribute you normally only need to escape the following characters:

&

<

You can run multiple commands in one login session by repeating the <run> nested element. For example:

<dimensions userID="dmsys" password="dmsys_test"

database="DEV@PROD" server="prod1">

<run cmd=

<run cmd=

</dimensions>

See the Dimensions CM Command-Line Reference for details of Dimensions commands.