Building packages
Use the HCL Commerce Build tool to build packages for deployment.
Before you begin
- Set up source extraction configurations.
- Configure packaging settings.
- Copy the source code of the customization assets to a local directory (in local mode), or setup
a Source Code Management (SCM) repository to properly extract them.
Project Copy these files WebSphereCommerceServerExtensionsLogic Include all the project code from the source directory. WebSphereCommerceServerExtensionsData Include all the project code from the source directory. Customizable web modules. - CommerceAccelerator.war
Include only the files that were created or modified by you.. Customization server. Since it is dedicated to customization, extract or copy all of the files in it to the working directory.
Procedure
- Change to the WCB_installdir directory.
-
Build the package.
-
wcbd-ant.bat -Dapp.type=app-type -Dbuild.type=build-type -buildfile wcbd-build.xml -Dbuild.label=build-label
-
wcbd-ant -Dapp.type=app-type -Dbuild.type=build-type -buildfile wcbd-build.xml -Dbuild.label=build-label -Dwork.dir=mounted_dir
Where:- app.type
- The application that you want to package.
- build.type
-
- local
- Retrieve files locally.
- svn
- Retrieve files from an Apache Subversion repository.
- cvs
- Retrieve files from a CVS repository.
- git
- Retrieve files from a Git repository.
- build.label
- An identifier for the package. Use a meaningful build label such the build date or the tag name of the SCM.
- work.dir
- (Optional) If you created an external volume mount in Configuring packaging settings, then specify the volume mount.
-
-
Check the log file in the following location:
WCB_installdir/logs/build-label-tstamp/wcbd-build.log
Note:For more information about the contents of the package, see Sample configuration.
Ant also provides a way to run an Ant build file with debug information to console. Specify the
-d
or the-debug
flag when calling wcbd-ant.bat or wcbd-ant in the build process. However, such debug information is not written to the log file created by the HCL Commerce Build tool. When you run the HCL Commerce Build tool in debug mode, redirect the standard output and standard error streams to a separate log file.
Results
A compressed file is created and saved to the relevant dist directory, following the file and naming convention WCDE_installdir/wcbd/dist/server/wcbd-deploy-server-build-label.zip. Use this package to build a new Docker image to include your custom code. For more information, see Building a custom Docker image from a deployable package.