Administer > Deploy > Overview: WebSphere Commerce Build and Deployment tool > Customize the Build and Deployment tool


Customize the build process

Advanced users can customize the build 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.

scm refers to an identifier that represents your Source Control Management system.

Tip: WCBD_INSTALL/wcbd-build-common.xml provides helper Ant targets that are reusable and serves as examples for customization. Refer to the comments within this file for more information.


Procedure

  1. Optional: When you set up the source extraction Ant script, if the SCM used in the customization project is not one for which sample scripts are provided, develop custom scripts to integrate with the SCM:

    1. Copy WCBD_INSTALL/extract/wcbd-extract.private.properties.template as WCBD_INSTALL/extract-scm.private.properties.

    2. Copy WCBD_INSTALL/extract/wcbd-extract.properties.template as /WCBD_INSTALLextract-scm.properties.

    3. Copy WCBD_INSTALL/extract/wcbd-extract.xml.template as WCBD_INSTALL/extract-scm.xml.

    4. Change the file permission with the following commands:

      chmod 755 WCBD_INSTALL/extract-scm.*

    5. Open WCBD_INSTALL/extract-scm.xml with a text editor and replace the name attribute of the root project element from wcbd-extract to extract-scm. Then write the custom logic to extract the source code from the SCM. Refer to comments in the file for details.

    6. Open WCBD_INSTALL/extract-scm.private.properties with a text editor and add any security-sensitive properties required by WCBD_INSTALL/extract-scm.xml.

    7. Open WCBD_INSTALL/extract-scm.properties with a text editor and add any properties required by WCBD_INSTALL/extract-scm.xml.

  2. If new functionality is required in the Ant build:

    1. Create a new helper Ant build file called WCBD_INSTALL/project-build-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-build-common.xml"/>

    3. Add new targets to the file as needed. The existing helper target and any target that may depend on it can be overridden as per the specification of the Ant import task.

  3. If new security-sensitive properties (for example, user names and passwords) are required for the new changes:

    1. Copy WCBD_INSTALL/wcbd-build.private.properties.template as WCBD_INSTALL/project-build.private.properties.template.

    2. Add the new properties to the end of the file. Refer to comments in the file for details.
    This file will become the new properties template file for configuration.

  4. If new properties are required for the new changes:

    1. Copy WCBD_INSTALL/wcbd-build.properties.template as WCBD_INSTALL/project-build.properties.template.

    2. Add the new properties to the end of the file. Refer to the comments in the file for details.
    This file will become the new properties template file for configuration.

  5. If new libraries are required by Ant for the new changes:

    1. Copy WCBD_INSTALL/wcbd-setenv*.template as WCBD_INSTALL/project-setenv*.template.

    2. Update the CLASSPATH variable in WCBD_INSTALL/project-setenv.bat.template.
    These files will become the new setenv template files for configuration.

  6. To include the new or modified functionality in the overall build process:

    1. Copy WCBD_INSTALL/wcbd-build.xml as WCBD_INSTALL/project-build.xml.

    2. If the new helper Ant build file WCBD_INSTALL/project-build-common.xml was created as above, change the following line in WCBD_INSTALL/project-build.xml:

      <import file="${basedir}/wcbd-build-common.xml" />

      to:

      <import file="${basedir}/project-build-common.xml" />

    3. Modify the logic of the build process to incorporate the new changes. Refer to the comments in the file for details.

    Customize the files used for Configure the build settings and Run the build process is done in the same manner as for the default assets, except that the project-* files are used instead of the wcbd-* files.


Troubleshooting

If you get error doing extraction...

build: extract: [echoNL] Extracting source code with extract-svn.xml. all: [svn] <Update> started ... [svn] svn: Working copy '/opt/IBM/WebSphere/CommerceServer70/wcbd/source/IHS' locked; try performing 'cleanup' [svn] <Update> failed ! /opt/IBM/WebSphere/CommerceServer70/wcbd/wcbd-build.xml:133: The following error occurred while executing this line: /opt/IBM/WebSphere/CommerceServer70/wcbd/extract-svn.xml:55: Cannot update dir /opt/IBM/WebSphere/CommerceServer70/wcbd/source/IHS

Remove any SVN lck files in folder, verify permissions, and try the build again.


+

Search Tips   |   Advanced Search