Introduced in Feature Pack 3

Configuring and running the build process

Introduced in Feature Pack 3

You must create a deployment package by running the build process before a deployment can be run. The WebSphere Commerce Build and Deployment tool does this by extracting source code from the repository and compiling it.

In addition to creating the runtime deployment package, you also have the option of creating a deployment package for a development environment. In this tutorial, it is assumed that the target server is a runtime. That is, a Windows, DB2 and IIS environment.

See Configuring and running the server deployment process for more information.

Procedure

  1. Setup the source extraction Ant script.

    In this step, you setup the Ant script that extracts the source code from the local repository created in the previous lesson.

    1. Navigate to the following directory:
      • WCDE_installdir/wcbd/extract
    2. Copy the following file into the WCDE_installdir/wcbd directory:
      • wcbd-sample-extract-local.xml
      Then, copy the contents from the file to extract-local.xml.
    3. Copy the following file into the WCDE_installdir/wcbd directory:
      • wcbd-sample-extract-local.properties
      Then, copy the contents from the file to extract-local.properties.
    4. Open extract-local.xml.
      Change the following line:
      
      <project name="wcbd-sample-extract-local" default="all">
      
      To:
      
      <project name="extract-local" default="all">
      
    5. Save your changes and close the file.
    6. Open extract-local.properties and set local.extract.dir to local_repository.
      Note: In any properties files used by the WebSphere Commerce Build and Deployment tool, you must use forward slashes in directories (/) or the process fails.
  2. Configure the build setting.

    In this step, you modify the WebSphere Commerce Build and Deployment tool build configuration.

    1. Navigate to the following directory:
      • WCDE_installdir/wcbd
    2. Copy the following files into the WCDE_installdir/wcbd/lib directory:
      • XMLUpdate.jar (extracted from the XMLUpdate.zip tutorial resources archive).
      • Apache-Ant-Dir/lib/ant-contrib-1.0b3.jar
    3. Copy the following files into the WCDE_installdir/wcbd/lib directory:
      • wcbd-build.properties.template
      • wcbd-build.private.properties.template
      • wcbd-setenv.bat.template
      Then, copy the contents from wcbd-build.properties.template to build-local.properties, wcbd-build.private.properties.template to build-local.private.properties, and wcbd-setenv.bat.template to setenv.bat.
    4. Open setenv.bat. Modify the ANT_HOME and WAS_HOME environmental properties to the correct values. For example:
      
      set ANT_HOME=C:\apache-ant-1.8.2
      set WAS_HOME=C:\Progra~1\IBM\SDP\runtimes\base_v7
      
    5. Save your changes and close the file.
    6. Open build.properties. Set the following properties:
      
      java.module.list=WebSphereCommerceServerExtensionsLogic
      web.module.list=Stores
      open.laszlo.web.module.list=LOBTools
      wc.home=<Toolkit> (e.g. C:/IBM/WCDE_ENT70)
      was.home=<RAD_WAS> (e.g. C:/Progra~1/IBM/SDP/runtimes/base_v7)
      extract.ant.file=${basedir}/extract-local.xml
      
    7. Save your changes and close the file.
  3. Run the build process.

    In this step, you run the script that creates the deployment package.

    1. Open a command prompt and navigate to the following directory:
      • WCDE_installdir/wcbd
    2. Run the wcbd-ant command:
      
      wcbd-ant.bat -buildfile wcbd-build.xml -Dbuild.label=warranty -Dbuild.type=local
      
    When the build process completes successfully, you should find the following file:
    • WCDE_installdir/wcbd/dist/server/wcbd-deploy-server-warranty.zip
    This is the deployment package you have created for the Windows and DB2 runtime environment.