Building the validator

The Unica Campaign Validation PDK supplies an Ant script that can build all of the code in the sample files.

The default behavior for the script is to create a jar that contains the validation classes. Optionally, it can also create Javadoc and run tests against the validators to ensure that they work in Unica Campaign before trying to use the plug-in in production.

To build the validator:

  1. Change to the PDK directory <HCL_Unica_Home\Unica Campaign_Home>\devkits\validation\build

    For example: C:\HCL\Unica\Campaign\devkits\validation\build

    This directory contains the Ant script, build.xml.

  2. Run the Ant jar at the command line.
    • To create the plug-in without doing any unit tests, use the ant jar command.
    • To create the plug-in and also do unit testing, use the ant run-test command.

    Ant runs the script and produces a JAR file called validator.jar in the lib subdirectory. For example:

    C:\HCL\Unica\Campaign\devkits\validation\build\lib

You now have a custom validator that can be used in Unica Campaign. Your next step is to configure Unica Campaign to use this validator.