Sample configuration

The tool can build applications for all four server types: the Transaction server, Store server, Search server, and Customization server. An example shows how you can build your own extensions using the .

These examples are for reference only, intended as a starting point to help you to set up your own build environment.

The following WCB_sample.zip provides sample properties files that you can use as a reference to better understand what you need to configure. The WCB_sample.zip package also contains the xC sample.

Building for the Transaction server (ts)

To configure the build properties for a Transaction server package, build-buildtype-ts.properties, consider the following relevant configurations that you need to complete. The values in the following name-value pairs are the folders in your workspace. These properties determine which assets to package.

  • ejb.module.list=WebSphereCommerceServerExtensionsData
  • java.module.list=WebSphereCommerceServerExtensionsLogic
  • web.module.list=CommerceAccelerator
  • ear.dir.includes=lib/**,properties/**,xml/**
Based on these properties, the following table illustrates what is packaged into the output ZIP file when you build for the Transaction server.
Build process takes these folders from the workspace Packages to these folders in the output ZIP file Description
WC Code/ts-app/ EAR project
WC/lib Code/ts-app/lib/
  • Third party java libraries
  • Any JAR files under this path will be copied to ts.ear/lib in the Transaction server Docker image.
WC/properties Code/ts-app/properties/
  • Any properties files under this path will be copied to ts.ear/properties in the Transaction server Docker image.
WC/xml Code/ts-app/xml/
  • Any configuration files under this path will be copied to ts.ear/xml in the Transaction server Docker image.
WebSphereCommerceServerExtensionsData Code/ts-app/ejb/WebSphereCommerceServerExtensionsData.jar
  • EJB extensions project
  • Will invoke wsadmin scripts to update the EJB model for WebSphereCommerceExtensionData.jar
WebSphereCommerceServerExtensionsLogic Code/ts-app/WebSphereCommerceServerExtensionsLogic.jar
  • Java extensions project, src, and configFiles.
  • Will be copied to relative path under ts.ear in the Transaction server Docker image.
CommerceAccelerator Code/ts-app/CommerceAccelerator.war
  • Custom assets for : only modified files should be present.
  • Will copy and replace any existing files under the WAR folder in the Transaction server Docker image.
You need to define logic to determine where to pull the certificates. Certs/ts-app
  • This folder does not get packaged by default. If you want to import your own certificates, you need define the certificates in a JSON file and implement custom WCB logic to package the JSON files into this folder. For more information about implementing custom WCB logic, see Customizing the packaging process. If this Certs folder exists in the build package, then the JSON files are copied to the /SETUP/certs/custom directory of the target Docker image.
  • For information about how to store certificates in a JSON file, see Importing certificates from a local JSON file.
You need to define logic to determine where this folder exists in your workspace. DeployScripts/ts-app
  • This folder does not get packaged by default. If you want to package custom start up scripts, you need to implement custom WCB logic to package your assets into this DeployScripts folder. For more information about implementing custom WCB logic, see Customizing the packaging process
DeployScripts/ts-app/custConfiguration.sh
  • This file does not exist by default. If you want to create your own custom Docker container start up logic, you must use this file name. IBM logic looks for this script to invoke your custom start up logic. For more information, see Docker container start up logic for HCL Commerce Version 9.1.
  • You need to create logic in the applyDeployScripts.sh to copy custConfiguration.sh into the /SETUP/bin directory of the Transaction Server Docker image.
DeployScripts/ts-app/applyDeployScripts.sh
  • This script does not exist by default. Create this applyDeployScripts.sh script and define logic to copy your custom assets from DeployScripts folder into the desired locations in the target Docker image.
DeployScripts/ts-app/***
  • This represents your own folders or files that are needed for your unique customizations. You can include any assets that you might need to suit your special requirement. For example, to deploy custom Run Engine command logic, you can put your custom scripts, classes, or JAR files here and then define logic in the applyDeployScripts.sh file to determine what to do with these custom assets.

Remote stores (crs)

To configure the build properties for a Store server package, build-buildtype-crs.properties, consider the following relevant configurations that you need to complete. The values in the following name-value pairs are the folders in your workspace.

  • web.module.list=crs-web
  • java.module.list=crs-extensions-logic This project is used to customize java code for the crs-web store.
Based on these properties, the following table illustrates what is packaged into the output ZIP file when you build for the Store server.
Build process takes these folders from the workspace Packages to these folders in the output ZIP file Description
crs-web/ Code/crs-app/crs-web.war:/
  • Web module for remote stores, only custom files should be present.
  • Will unzip crs.ear in the Store server Docker image, replace existing wc-web.war, and then repackage crs.ear
crs-web/src/ Code/crs-app/crs-web.war:/WEB-INF/classes/
  • Custom Java classes for the web module.
crs-web/WebContent/ Code/crs-app/crs-web.war:/ Web content files for the web module.
crs-web/WebContent/META-INF/ Code/crs-app/crs-web.war:/META-INF/ Meta info files.
crs-web/WebContent/WEB-INF/ Code/crs-app/crs-web.war:/WEB-INF/ Web Info files.
crs-extensions-logic Code/crs-app/lib/crs-extensions-logic.jar Create a java utility project in the Store server to hold java customization code (Such as a JSTL tag library, ServletFilter, Listener or Spring MVC). The project can also hold custom resources in a manner similar to the Transaction server and Search server.
You need to define logic to determine where to pull the certificates. Certs/crs-app
  • This folder does not get packaged by default. If you want to import your own certificates, you need define the certificates in a JSON file and implement custom WCB logic to package the JSON files into this folder. For more information about implementing custom WCB logic, see Customizing the packaging process. If this Certs folder exists in the build package, then the JSON files are copied to the /SETUP/certs/custom directory of the target Docker image.
  • For information about how to store certificates in a JSON file, see Importing certificates from a local JSON file.
You need to define logic to determine where this folder exists in your workspace. DeployScripts/crs-app
  • This folder does not get packaged by default. If you want to package custom start up scripts, you need to implement custom WCB logic to package your assets into this DeployScripts folder. For more information about implementing custom WCB logic, see Customizing the packaging process
DeployScripts/crs-app/custConfiguration.sh
  • This file does not exist by default. If you want to create your own custom Docker container start up logic, you must use this file name. IBM logic looks for this script to invoke your custom start up logic. For more information, see Docker container start up logic for HCL Commerce Version 9.1.
  • You need to create logic in the applyDeployScripts.sh to copy custConfiguration.sh into the /SETUP/bin directory of the Transaction Server Docker image.
DeployScripts/crs-app/applyDeployScripts.sh
  • This script does not exist by default. Create this applyDeployScripts.sh script and define logic to copy your custom assets from DeployScripts folder into the desired locations in the target Docker image.
DeployScripts/crs-app/***
  • This represents your own folders or files that are needed for your unique customizations. You can include any assets that you might need to suit your special requirement. For example, to deploy custom Run Engine command logic, you can put your custom scripts, classes, or JAR files here and then define logic in the applyDeployScripts.sh file to determine what to do with these custom assets.

Commerce UE (xc)

To configure the build properties for a Customization server package, build-buildtype-xc.properties, consider the following relevant configurations that you need to complete. The values in the following name-value pairs are the folders in your workspace.

  • web.module.list=commerceue-app
  • web.src.dir=src/main/java
  • web.resource.dir=src/main/resources
Based on these properties, the following table illustrates what is packaged into the output ZIP file when you build for the Customization server.
Build process takes these folders from the workspace Packages to these folders in the output ZIP file Description
commerceue-ear/src/main/application/ Code/xc-app/
  • EAR level files.
  • All files under commerceue-ear will be copied to the relative directory in the commerceue-ear.ear in the Customization server Docker image.
commerceue-ear/src/main/application/lib Code/xc-app/lib Java libraries for the EAR
commerceue-ear/src/main/application/META-INF/ Code/xc-app/META-INF/ Meta info for the EAR
commerceue-app/src/main/java/ Code/xc-app/commerceue-app.war:/WEB-INF/classes
  • Java source file directory
  • All files under commerceue-app will be copied to the relative directory in the commerceue-ear.ear/commerceue-ear.ear/commerceue-app.war in the Customization server Docker image.
commerceue-app/src/main/resources/ Code/xc-app/commerceue-app.war:/WEB-INF/classes Java resource file directory, especially property files
commerceue-app/WebContent/ Code/xc-app/commerceue-app.war:/ Web content
commerceue-app/WebContent/WEB-INF/ Code/xc-app/commerceue-app.war:/WEB-INF/ WEB-INF directory
commerceue-app/WebContent/swagger/ Code/xc-app/commerceue-app.war:/swagger/ Swagger web app files
commerceue-app/WebContent/META-INF Code/xc-app/commerceue-app.war:/META-INF/ Web meta information directory
You need to define logic to determine where to pull the certificates. Certs/xc-app
  • This folder does not get packaged by default. If you want to import your own certificates, you need define the certificates in a JSON file and implement custom WCB logic to package the JSON files into this folder. For more information about implementing custom WCB logic, see Customizing the packaging process. If this Certs folder exists in the build package, then the JSON files are copied to the /SETUP/certs/custom directory of the target Docker image.
  • For information about how to store certificates in a JSON file, see Importing certificates from a local JSON file.
You need to define logic to determine where this folder exists in your workspace. DeployScripts/xc-app
  • This folder does not get packaged by default. If you want to package custom start up scripts, you need to implement custom WCB logic to package your assets into this DeployScripts folder. For more information about implementing custom WCB logic, see Customizing the packaging process
DeployScripts/xc-app/custConfiguration.sh
  • This file does not exist by default. If you want to create your own custom Docker container start up logic, you must use this file name. IBM logic looks for this script to invoke your custom start up logic. For more information, see Docker container start up logic for HCL Commerce Version 9.1.
  • You need to create logic in the applyDeployScripts.sh to copy custConfiguration.sh into the /SETUP/bin directory of the Transaction Server Docker image.
DeployScripts/xc-app/applyDeployScripts.sh
  • This script does not exist by default. Create this applyDeployScripts.sh script and define logic to copy your custom assets from DeployScripts folder into the desired locations in the target Docker image.
DeployScripts/xc-app/***
  • This represents your own folders or files that are needed for your unique customizations. You can include any assets that you might need to suit your special requirement. For example, to deploy custom Run Engine command logic, you can put your custom scripts, classes, or JAR files here and then define logic in the applyDeployScripts.sh file to determine what to do with these custom assets.

Building data

For data, you do not need to specify the assets to be built. You only need to put your data files into related directories (sql, xml, dataload, acug, acp, acpnls). For the details of file structures, see HCL Commerce Build tool repository structure.