Advanced users can customize the toolkit deployment process
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
- If new functionality is required in the Ant build:
- Create a helper Ant build file called WCBD_deploy_toolkit_dir/project-deploy-common.xml.
- 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" />
- 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.
- If new security-sensitive properties (for example, user
names and passwords) are required for the new changes:
- Copy WCBD_deploy_toolkit_dir/wcbd-deploy.private.properties.template as WCBD_deploy_toolkit_dir/project-deploy.private.properties.template.
- 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.
- If new properties are required for the new changes:
- Copy WCBD_deploy_toolkit_dir/wcbd-deploy.properties.template as WCBD_deploy_toolkit_dir/project-deploy.properties.template.
- 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.
- If new libraries are required by Ant for the new changes:
- Copy WCBD_deploy_toolkit_dir/wcbd-setenv.bat.template as WCBD_deploy_toolkit_dir/project-setenv.bat.template.
- Update the
CLASSPATH
variable in WCBD_deploy_toolkit_dir/project-setenv.bat.template.
These file becomes the new setenv.bat template
files for configuration.
- To include the new or modified functionality in the overall
toolkit deployment process:
- Copy WCBD_deploy_toolkit_dir/wcbd-deploy.xml as WCBD_deploy_toolkit_dir/project-deploy.xml.
- 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" />
- Modify the logic of the toolkit deployment process to
incorporate the new changes. Refer to comments in the file for details.
What to do next
When the customization is completed copy the new files to WCBD_installdir/deploy/toolkit directory
on the build system. If applicable, check into SCM, so that the changes
are reflected subsequent builds.