Build packages

Use the WebSphere Commerce Build tool to build packages for deployment.


Before starting

  1. Set up source extraction configurations.

  2. Configure packaging settings.

  3. 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

  1. Change to the WCB_installdir directory.

  2. Build the package.

    • (Developer)

        wcbd-ant.bat -Dapp.type=app-type -Dbuild.type=build-type -buildfile wcbd-build.xml -Dbuild.label=build-label

    • (Linux)

        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 to package.

        ts Build packages for the Transaction server.
        search Build packages for the Search server
        xc Build packages for the Customization server
        crs Build packages for the Store server
        data Build packages for the Data and Schema changes

      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.

    (Linux)

  3. Check the log file in the following location: WCB_installdir/logs/build-label-tstamp/wcbd-build.log

    Note:

    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 WebSphere Commerce Build tool. When you run the WebSphere Commerce Build tool in debug mode, redirect the standard output and standard error streams to a separate log file. For more information about the contents of the package, see Sample WebSphere Commerce Build tool configuration.


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 custom code.


Related concepts
WebSphere Commerce Build tool repository structure
Advanced build features


Related tasks
Setting up source extraction Ant script
Configure packaging settings


Related reference
Build configuration references