Repository structure for building Remote stores (crs) packages

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.

Package folders and contents for a store server package.

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:/
  • The default extension point for remote store based on the default store Docker image.
  • Web content files for the remote store Web module.
crs-extensions-logic Code/crs-app/lib/crs-extensions-logic.jar
  • The default extension point for the remote store that is based on the default store Docker image.
  • 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.
  • This project can hold custom resources in a manner similar to the Transaction server and Search server.
crs-alias-proxy-web.war Code/crs-app/crs-alias-proxy-web.war
  • (Optional) You don’t need to change by default. Store Alias Proxy File Servlet and configuration for serving static files such as images and css file etc.
crs-preview-web.war Code/crs-app/crs-preview-web.war
  • (Optional) This folder includes store preview servlet and configuration files for serving the store preview from Management Center. By default, you do not need to change these files.
Jar files Code/crs-app/lib/*.jar
  • (Optional) This folder includes all dependent JAR files. By default, you do not need to change these files.
META-INF Code/crs-app/META-INF
  • (Optional) Application.xml. This folder holds all web modules and context root.
  • Known issues: The file is not packaged by the HCL Commerce Build tool. You must place files within this folder manually if you need to change files within the folder.
properties Code/crs-app/properties
  • (Optional) Application error messages and store server error messages are stored in these files.
xml Code/crs-app/xml
  • (Optional) Remote store configuration and attribute masking policy configuration files are stored here.
crs-web/src/ Code/crs-app/crs-web.war:/WEB-INF/classes/
  • Custom Java classes 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.
Certs/crs-app
  • This folder does not exist in the default HCL Commerce Build store package. The build and deployment process is designed to support the use of the folder as an interface for your extensions.
  • If you want to import your own certificates, you must implement HCL Commerce Build logic to create this folder and to include your certificate JSON file into this folder within a WebSphere Commerce Build store package. For more information, see Managing certificates manually.
DeployScripts/crs-app
  • Similar to the Certs folder, the DeployScripts folder does not exist in the default HCL Commerce Build store package. The build and deployment process is designed to support the use of the folder as a potential extension point for you to customize the deployment process.
  • If you want to extend the default deployment process with your own custom code logic, you need to implement HCL Commerce Build logic to create the folder and to place your custom shell scripts within the folder. Your custom shell scripts within the folder must be named as applyDeployScripts.sh
  • The default logic to apply changes detects whether there are any applyDeployScripts.sh scripts within the folder. If found, the scripts are run to process any of your custom deployment logic. The default logic to apply changes is defined within the /SETUP/bin/applyCustomization.sh file for reference.

Store server deployment package structure

The following file structure shows the generated package structure for a remote store (crs) package after the HCL Commerce Build tool completes building the package.

¦
+---Code
¦   +---crs-app The default deployment process handles the following three types of WAR files within the crs-app folder.)
¦       ¦   crs-alias-proxy-web.war
¦       ¦   crs-preview-web.war
¦       ¦   crs-web.war  
¦       ¦
¦       +---lib (The default deployment process copies all files under the lib folder to the crs.ear/lib directory.) 
¦       ¦   ¦   aopalliance-1.0.jar
¦       ¦   ¦   cf-wcf.jar
¦       ¦   ¦   commons-codec-1.6.jar
¦       ¦   ¦   commons-configuration-1.8.jar
¦       ¦   ¦   commons-io-2.1.jar
¦       ¦   ¦   commons-lang-2.6.jar
¦       ¦   ¦   commons-lang3-3.3.2.jar
¦       ¦   ¦   commons-logging-1.2.jar
¦       ¦   ¦   crs-extensions-logic.jar
¦       ¦   ¦   crs-store-publish-jianing.jar
¦       ¦   ¦   crs-store-publish.jar
¦       ¦   ¦   crs-web-taglibs.jar
¦       ¦   ¦   .....
¦       ¦   ¦   zookeeper-3.4.12.jar
¦       ¦
¦       +---META-INF (The default deployment process copies all files under the META-INF folder to the crs.ear/META-INF directory.)  
¦       ¦       MANIFEST.MF
¦       ¦       application.xml
¦       ¦
¦       +---properties (The default deployment process copies all files under the properties folder to the crs.ear/properties directory.) 
¦       ¦   ¦   GenericApplicationError.properties
¦       ¦   ¦   GenericApplicationError_ar_EG.properties
¦       ¦   ¦   GenericApplicationError_de_DE.properties
¦       ¦   ¦   ......properties
¦       ¦   ¦   GenericApplicationError_ru_RU.properties
¦       ¦   ¦   GenericApplicationError_tr_TR.properties
¦       ¦   ¦   GenericApplicationError_zh_CN.properties
¦       ¦   ¦   GenericApplicationError_zh_TW.properties
¦       ¦   ¦   GenericSystemError.properties
¦       ¦   ¦   GenericSystemError_ar_EG.properties
¦       ¦   ¦   ......properties
¦       ¦   ¦   GenericSystemError_zh_CN.properties
¦       ¦   ¦   GenericSystemError_zh_TW.properties
¦       ¦   ¦   log4j.properties
¦       ¦   ¦
¦       ¦   +---com
¦       ¦       +---ibm
¦       ¦           +---commerce
¦       ¦               +---ras
¦       ¦                   +---properties
¦       ¦                           ecServerMessages.properties
¦       ¦                           ecServerMessages_ar_EG.properties
¦       ¦                           ......properties
¦       ¦                           ecServerMessages_zh_TW.properties
¦       ¦
¦       +---xml (The default deployment process copies all files under the xml folder to the crs.ear/xml directory.)
¦           +---config
¦           ¦   ¦   denyList.xml
¦           ¦   ¦   wc-attribute-masking.xml
¦           ¦   ¦   wc-store.xml
¦           ¦   ¦
¦           ¦   +---com.ibm.commerce.store
¦           ¦   ¦       store-rest-group.xml
¦           ¦   ¦
¦           ¦   +---xsd
¦           ¦           wc-alias-config.xsd
¦           ¦           wc-seo-url-pattern.xsd
¦           ¦
¦           +---mapper
¦                   SEOUrlMapper.xml
¦
+---Certs (You can add this folder on demand.)
¦   +---crs-app

+---DeployScripts (You can add this folder on demand.)
    +---crs-app
            applyDeployScripts.sh

HCL Commerce now supports handling custom files within all default folders of a remote store (crs) package, as indicating in the preceding repository structure. This support provides you with more capability for applying custom logic to your store server.

For your Certs and DeployScripts folders, both folders are reserved within the default code for applying customization logic for you to use for extensions. The default code for applying logic is included within the /SETUP/bin/applyCustomization.sh file. The HCL Commerce Build tool scripts do not generate these folders by default. You need customize the scripts to configure the tool to generate and package these two folders.

If your environments are not updated to the 9.0.1.3 or 9.0.0.12 update package level, the default provided logic handles one extension point, the crs-web.war archive. If you need to apply customization files, you need to customize the DeployScripts folder to add your custom logic for applying your files.