You can build and deploy a package of your custom or updated Commerce Composer assets
with the HCL Commerce Build and Deployment tool.
About this task
The HCL Commerce Build and Deployment tool is designed to address the
error-prone and time-consuming nature of customized asset deployment. The HCL 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.
-
Create the source code repository to include the Data Load utility files and code packages for
your widget customization code.
-
In a File Manager, go to the WCBD_installdir
directory.
-
Create the following directory structure within the wcbd directory:
-
Add the files for your custom Commerce Composer assets into your source code repository for the
HCL Commerce Build and Deployment tool.
-
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.
-
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.
-
Add the storefront and Management Center code packages for your Commerce Composer asset into
your source code repository for the HCL Commerce Build and Deployment tool.
-
Go to the workspace_dir directory.
-
Copy the LOBTools directory.
-
Paste the LOBTools directory within the
WCDE_installdir\wcbd\source\workspace directory.
-
Go to the
workspace_dir\Stores\WebContent\storedir
directory.
-
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
-
Set up the source extraction Ant script.
The Ant script extracts the source code from the source code repository that you
created.
-
Go to the WCBD_installdir\extract directory.
-
Copy the wcbd-sample-extract-local.properties and
wcbd-sample-extract-local.xml files.
-
Paste the files into the WCBD_installdir
directory.
-
Rename the wcbd-sample-extract-local.properties file to be
extract-local.properties.
-
Rename the wcbd-sample-extract-local.xml file to be
extract-local.xml.
-
Open the extract-local.xml file for editing.
-
Locate the following line of code:
<project name="wcbd-sample-extract-local" default="all">
-
Replace the line of code that you located with the following code:
<project name="extract-local" default="all">
-
Save and close the files.
-
Open the extract-local.properties file for editing.
-
Set the value for
local.extract.dir=
to be
WCBD_installdir/source
Note: In all of the properties files that your HCL Commerce Build and Deployment
tool uses, you must use forward slashes in the file paths. Otherwise, the build process
fails.
-
Configure the HCL Commerce Build and Deployment tool build settings.
-
Go to the Ant_installdir\lib
-
Copy the ant-contrib-1.0b3.jar file.
-
Paste the JAR files into the WCBD_installdir\lib
directory.
-
Go to the WCBD_installdir directory.
-
Create a copy of the wcbd-setenv.bat file and rename the copy
setenv.bat.
-
Create a copy of the wcbd-build.private.properties.template and rename the
copy build-local.private.properties.
-
Create a copy of the wcbd-build.properties.template and rename the copy
build-local.properties.
-
Open the setenv.bat for editing.
-
Change the value for
ANT_HOME
to be
Ant_installdir.
For example, C:/apache-ant-1.8.1
-
Ensure that the value for
WAS_HOME
to be the correct value.
For example, C:/Progra~1/IBM/SDP/runtimes/base_v7
-
Open the build-local.properties file for editing.
-
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
-
Save and close the files.
-
Run the build process. During the build process, you run a script to create the deployment
package.
-
Open a command prompt and go to the
WCBD_installdirdirectory.
-
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
HCL Commerce Build and Deployment tool creates two
deployment packages
- A package for production environment deployment.
- A package for HCL Commerce Developer server deployment.
The packages are located within the
WCBD_installdir\dist directory.
-
Deploy your package.