Set Up Your Build

After you have successfully downloaded and unpacked the required files, you must then create your SAP Commerce Cloud project directories before proceeding.

To set up SAP Commerce Cloud, carry out the following steps.

  1. Set up Apache Ant
  2. Start a clean build to create your project directories

Setting up Apache Ant

SAP Commerce Cloud comes pre-bundled with Apache Ant, a tool for automating the software build processes. Configure Apache Ant before you build SAP Commerce Cloud.

Context

SAP Commerce Cloud provides three script files that you can use to set your Ant environment for the current command console session:

  • setantenv.bat: a batch file for Microsoft Windows systems
  • setantenv.ps1: a shell script file for Windows Powershell
  • setantenv.sh: a shell script file for Unix-based systems such as Linux or Mac OS X

Procedure

  1. Open a command prompt in Microsoft Windows, or a shell in the Unix family
  2. Navigate to hybris/bin/platform in your installation.

    For example:

    C:\hybris\bin\platform
  3. Run the provided script for your platform.
    • For Windows systems, enter setantenv.bat
    • For Windows Powershell, enter .\setantenv.ps1
    • For Unix systems, including Mac OSX, enter . ./setantenv.sh

    Do not close the command window, as you need it for the next steps of the installation procedure. Doing so may require you to set the Ant environment once again.

Results

You should see something similar to the following:

Creating the Project Directories

Once you have set up your Ant environment, use Ant to create your SAP Commerce Cloud project framework.

Context

Running ant clean all on a new instance of SAP Commerce Cloud creates any configuration files and other essential directories. This is a necessary step in the installation process, and must be done once before you proceed with the configuration.

If a build already exists, it deletes and recreates it. Repeat this command any time you wish to create a new build in place of an old one.

Procedure

  1. At the command prompt, navigate to /hybris/bin/platform and enter the following command.
    ant clean all

    The system prompts you to choose a configuration template for your environment. You can choose from either development, or production.

    Buildfile: C:\hybris\bin\platform\build.xml
         [echo]
        [mkdir] Created dir: C:\hybris\log
        [mkdir] Created dir: C:\hybris\data
        [mkdir] Created dir: C:\hybris\temp\hybris
        [input]
        [input]  **** NO CONFIG FOLDER FOUND **** use the jar utility to
                        unzip the zip file on unix based systems, as this will change the timestamps of
                        the contained files and break the build process.Buildfile: C:\hybris\bin\platform\build.xml
         [echo]
        [mkdir] Created dir: C:\hybris\log
        [mkdir] Created dir: C:\hybris\data
        [mkdir] Created dir: C:\hybris\temp\hybris
        [input]
        [input]
        [input]  No config folder was found at C:\hybris-4.5\hybris\config.
        [input]  A "fresh" folder containing basic configuration files and the hybris
        [input]  demo licence will be created for your convenience.
        [input]  Please adjust and review the configuration files (and license) and
        [input]  call 'ant' again. This directory will never be overridden or
        [input]  touched again. Always use this configuration folder for configuration
        [input]  of platform, do not change anything within the platform folder.
        [input]
        [input]  Please choose the configuration template.
        [input]  Press [Enter]
        [input to use the default value ([develop], production)
  2. Select the appropriate configuration template.
    • To choose the default develop template, press Enter.
    • To choose the production template, type production, then press Enter.

    Always choose the develop template for test, development, and demonstration purposes.

    When the build process is complete, you should see output similar to the following:

    server:
         [echo]
         [echo] Configuring server at C:\hybris\bin\platform/tomcat-6
         [echo] Using config set at C:\hybris\config/tomcat
         [echo]
        [mkdir] Created dir: C:\hybris\log\tomcat
        [mkdir] Created dir: C:\hybris\data\media
         [copy] Copying 8 files to C:\hybris\bin\platform\tomcat-6
         [copy] Copying 6 files to C:\hybris\bin\platform\tomcat-6
         [copy] Copying 1 file to C:\hybris\bin\platform\tomcat-6\lib
         [echo]
         [echo] Embedded server does not seem to be running (no PID found). No restart necessary.
         [echo]
    
    all:
         [echo] Build finished on 26-March-2013 11:23:33.
         [echo]
    
    BUILD SUCCESSFUL
    Total time: 3 minutes 15 seconds
    C:\hybris\bin\platform>

Results

Your hybris directory now contains the following: