Customizing the Build and Deployment tool
Although the Build and Deployment tool supports a wide range of configuration by default through samples and configurations, a WebSphere Commerce customization project may have very specific needs that are not easily supported. To tailor to such needs, the Build and Deployment tool provides extension points which can be leveraged to develop customized build and deployment processes. This section provides customization guidelines and instructions.
Note: Advanced
skills in Apache Ant are required to customize the Build and Deployment
tool. The Apache Ant Manual is a useful as
a reference for available Ant tasks.
General customization guidelines
The following customization guidelines apply for better reusability and serviceability:
- Always check the documentation and configuration files from the Build and Deployment Tool first to see if the customization can be done with default functionality. The configuration files are designed to handle most configuration or customization such as changing directories and changing the settings of various tools. This will avoid duplicated work.
- The Build and Deployment tool provides helper assets that are
reusable and serve as examples for customization. Such assets are
generally marked using
-common
in the file name and are very well documented within the file. Always examine these files before customization to understand what can be reused. - Template files have sections identified by the string
CUSTOMIZATION
which provides details and tips on customizing files created from them. - Use a prefix project
-
, where project is an identifier of the project, for any new files created as part of the customization. For example, if the customization project is called "abc" and a customized version of wcbd-build.xml is required, the recommended name of the new file is abc-build.xml. - When new helper Ant build files and properties files are introduced,
ensure that they are loaded in the main Ant build file using the
import
andproperty
Ant tasks respectively. For helper Ant build files, do not add a default target to the project. - Ensure that any new targets and properties do not share the same name as existing ones in the out-of-the-box helper Ant build files and configuration files.
- If optional Ant tasks are used, ensure that all dependent libraries
are added to the WCBD_installdir/lib directory
and are included in the classpath in the
setenv
files.
Non-customizable files
All files that start
with the prefix wcbd-
are deemed non-customizable
for serviceability reasons. Under no circumstances should these files
be modified or removed by users of the Build and Deployment tool.