Customizing the toolkit deployment process

Advanced users can customize the toolkit deployment process by using the Apache Ant scripting language. This task guides you through creating your customization files for use with the WebSphere Commerce Build and Deployment tool.

About this task

WCBD_deploy_toolkit_dir/wcbd-deploy-common.xml provides helper Ant targets that are reusable and serves as examples for customization.

Procedure

  1. If new functionality is needed in the Ant build, then complete the following steps.
    1. Create a helper Ant build file that is called WCBD_deploy_toolkit_dir/project-deploy-common.xml.
    2. Open the file with a text editor and add the following line after the root project element open tag:
      <import file="${basedir}/wcbd-deploy-common.xml" />
    3. Add new targets to the file as needed.
      The existing helper target and any targets that might depend on it can be overridden using the specification of the Antimport task.
  2. Create new properties if new security-sensitive properties (such as user names and passwords) are needed for the new changes.
    1. Copy WCBD_deploy_toolkit_dir/wcbd-deploy.private.properties.template as WCBD_deploy_toolkit_dir/project-deploy.private.properties.template.
    2. Add the new properties to the end of the file. See comments in the file for details.
    This file becomes the new properties template file for configuration.
  3. Create new properties if other properties are needed for the new changes.
    1. Copy WCBD_deploy_toolkit_dir/wcbd-deploy.properties.template as WCBD_deploy_toolkit_dir/project-deploy.properties.template.
    2. Add the new properties to the end of the file. For more information, see the comments in the file.
    This file becomes the new properties template file for configuration.
  4. Update CLASSPATH variable if new libraries are need by Ant for the new changes.
    1. Copy WCBD_deploy_toolkit_dir/wcbd-setenv.bat.template as WCBD_deploy_toolkit_dir/project-setenv.bat.template.
    2. Update the CLASSPATH variable in WCBD_deploy_toolkit_dir/project-setenv.bat.template.
    This file becomes the new setenv.bat template files for configuration.
  5. Include the new or modified functionality in the overall toolkit deployment process by completing the following steps.
    1. Copy WCBD_deploy_toolkit_dir/wcbd-deploy.xml as WCBD_deploy_toolkit_dir/project-deploy.xml.
    2. If the new helper Ant build file WCBD_deploy_toolkit_dir/project-deploy-common.xml was created as shown in the preceding example, change the following line in WCBD_deploy_toolkit_dir/project-deploy.xml:
      <import file="${basedir}/wcbd-deploy-common.xml" />
      to:
       <import file="${basedir}/project-deploy-common.xml" /> 
    3. Modify the logic of the toolkit deployment process to incorporate the new changes. Refer to comments in the file for details.
    To customize the files for Configuring the toolkit deployment settings and Running the toolkit deployment process use the same steps, but use the project-* files instead of the wcbd-* files.

What to do next

When the customization is completed, copy the new files to the WCBD_installdir/deploy/toolkit directory that is on the build system. If applicable, check the files into your SCMso that the changes are reflected in subsequent builds.