Deploying Commerce Composer assets

You can build and deploy a package of your custom or updated Commerce Composer assets with the WebSphere Commerce Build and Deployment tool.

About this task

The WebSphere Commerce Build and Deployment tool is designed to address the error-prone and time-consuming nature of customized asset deployment. The WebSphere Commerce Build and Deployment tool provides a starting point for you to automate your build and deployment processes in a standardized, controlled manner.

The following procedure provides information to help you package and deploy your widget customization code.

Procedure

Create the source code repository to contain the assets that you are deploying.
Note: If you are deploying page layout assets, ensure that you include the widget and layout template assets if the assets are already deployed.
  1. Create the source code repository to include the Data Load utility files and code packages for your widget customization code.
    1. In a File Manager, go to the WCBD_installdir directory.
    2. Create the following directory structure within the wcbd directory:

      source\workspace

  2. Add the files for your custom Commerce Composer assets into your source code repository for the WebSphere Commerce Build and Deployment tool.
    1. In the WCBD_installdir\source\workspace directory, create the following directory structure:

      DataLoad\dataload\common

      You use the directory structure to hold your Data Load utility files during the build process.
    2. Copy all of the data load configuration files, input files, and folder structure for the assets that you are deploying into your WCBD_installdir\source\workspace\DataLoad\dataload\common directory.
  3. Add the storefront and Management Center code packages for your Commerce Composer asset into your source code repository for the WebSphere Commerce Build and Deployment tool.
    1. Go to the workspace_dir directory.
    2. Copy the LOBTools directory.
    3. Paste the LOBTools directory within the WCDE_installdir\wcbd\source\workspace directory.
    4. Go to the workspace_dir\Stores\WebContent\storedir directory.
    5. Copy the folder structure and all of the files for your assets into the WCDE_installdir\wcbd\source\workspace directory.
Configure and run the build process
  1. Set up the source extraction Ant script.
    The Ant script extracts the source code from the source code repository that you created.
    1. Go to the WCBD_installdir\extract directory.
    2. Copy the wcbd-sample-extract-local.properties and wcbd-sample-extract-local.xml files.
    3. Paste the files into the WCBD_installdir directory.
    4. Rename the wcbd-sample-extract-local.properties file to be extract-local.properties.
    5. Rename the wcbd-sample-extract-local.xml file to be extract-local.xml.
    6. Open the extract-local.xml file for editing.
    7. Locate the following line of code:
      <project name="wcbd-sample-extract-local" default="all">
    8. Replace the line of code that you located with the following code:
      <project name="extract-local" default="all">
    9. Save and close the files.
    10. Open the extract-local.properties file for editing.
    11. Set the value for local.extract.dir= to be WCBD_installdir/source
      Note: In all of the properties files that your WebSphere Commerce Build and Deployment tool uses, you must use forward slashes in the filepaths. Otherwise, the build process fails.
  2. Configure the WebSphere Commerce Build and Deployment tool build settings.
    1. Go to the Ant_installdir\lib
    2. Copy the ant-contrib-1.0b3.jar file.
    3. Paste the JAR files into the WCBD_installdir\lib directory.
    4. Go to the WCBD_installdir directory.
    5. Create a copy of the wcbd-setenv.bat file and rename the copy setenv.bat.
    6. Create a copy of the wcbd-build.private.properties.template and rename the copy build-local.private.properties.
    7. Create a copy of the wcbd-build.properties.template and rename the copy build-local.properties.
    8. Open the setenv.bat for editing.
    9. Change the value for ANT_HOME to be Ant_installdir.
      For example, C:/apache-ant-1.8.1
    10. Ensure that the value for WAS_HOME to be the correct value.
      For example, C:/Progra~1/IBM/SDP/runtimes/base_v7
    11. Open the build-local.properties file for editing.
    12. Set the following properties and values:
      web.module.list=Stores
      wc.home=WCDE_installdir
      was.home=C:/Progra~1/IBM/SDP/runtimes/base_v7
      extract.ant.file=${basedir}/extract-local.xml
    13. Save and close the files.
  3. Run the build process. During the build process, you run a script to create the deployment package.
    1. Open a command prompt and go to the WCBD_installdirdirectory.
    2. Run the following command:

      wcbd-ant.bat -buildfile wcbd-build.xml -Dbuild.label=composer -Dbuild.type=local

      Where the value for the -Dbuild.label parameter is the name of your package. You can set the value for the parameter to be whatever value that you want to name your package. As an example, the previous command, names the package composer.
    When the command runs, the WebSphere Commerce Build and Deployment tool creates two deployment packages
    • A package for production server deployment.
    • A package for WebSphere Commerce Developer server deployment.
    The packages are located within the WCBD_installdir\dist directory.
  4. Deploy your package.