---
# System prepended metadata

title: Training -1

---

Training -1
===

:mega: Before starting the learning journey, please check if all of the following software is installed on your system, if not, please continue this section and follow the installation instructions.

* [x] git
* [x] Java SDK 11
* [x] Ant
* [x] ImageMagick
* [x] npm

> :bell: **Windows Users**
>
> This training can be completed at 100% using Windows OS, but it comes with a cost: your time :timer:, and extra steps to configure your environment. Also, because of some inherent properties of the Windows OS, compilation times takes longer than in Unix based Systems (like Linux or OSX)
>
> It is highly recommended that you install the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install) to avoid these nuances.

## :golf: Goal

> Our objective is to complete the configuration of the development environment. And ensure the subsequent training run smoothly.

### How to install

Some of the software not in your local development environment? Worry not; Here, you have the installation instructions for all of them.

### Git

- Windows

Download the 64-bit version from [Git website](https://git-scm.com/download/win) or run the following command using [Chocolatey](https://chocolatey.org/install)

```bash
$ choco install git
```

- Linux (Ubuntu)

```bash
$ sudo apt-get install git
```

- OSX

It should be already installed on your system; if not, run

```bash
$ brew install git
```

### Java

It is recommended to install [SAP Machine JDK 11](https://sap.github.io/SapMachine/), but other open source JDKs are also fine.

eg. Amazon Corretto  [https://aws.amazon.com/corretto](https://aws.amazon.com/corretto)

(Optional) A software development kit manager like [SDK man](https://sdkman.io) may help you manage different Java versions more effectively

### Ant

- Windows

Install from chocolatey or follow this [guide](https://mkyong.com/ant/how-to-install-apache-ant-on-windows/)

```
$ choco install ant
```

- Linux (Ubuntu)

```
$ sudo apt-get install ant
```

- OSX

```bash
$ brew install ant
```

### Imagemagick

- Windows

Download and install binary for [ImageMagick website](https://imagemagick.org/script/download.php) or run the following command using [Chocolatey](https://chocolatey.org/install)

```bash
$ choco install imagemagick
```

- Linux (Ubuntu)

```
$ sudo apt-get install imagemagick
```

- OSX

```bash
$ brew install imagemagick
```

## :white_check_mark: Check your work

Before continuing with the Training, verify your software is installed correctly by running the following commands _(versions may differ)_

### Git

```bash
$ git version                                                                                                                                                                                                                                          
git version 2.33.1
```

### Java

:warning: Java mayor version should be 11

```bash
$ java -version                                                                                                                                                                                                                              sap64-11.0.12
openjdk version "11.0.12" 2021-07-20 LTS
OpenJDK Runtime Environment SapMachine (build 11.0.12+7-LTS-sapmachine)
OpenJDK 64-Bit Server VM SapMachine (build 11.0.12+7-LTS-sapmachine, mixed mode)
```

### Ant

```bash
$ ant -version                                                                                                                                                                                                                               sap64-11.0.12
Apache Ant(TM) version 1.10.11 compiled on July 10 2021
```

### ImageMagick

- Linux or MacOs

```bash
$ convert --version
Version: ImageMagick 7.1.0-19 Q16-HDRI x86_64 2021-12-22 https://imagemagick.org
Copyright: (C) 1999-2021 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP(5.0) 
Delegates (built-in): bzlib fontconfig freetype gslib heic jng jp2 jpeg lcms lqr ltdl lzma openexr png ps tiff webp xml zlib
Compiler: gcc (4.2)
```

- Windows

```bash
$ magick identify --version
Version: ImageMagick 7.1.0-31 Q16-HDRI x64 aa6e7e5:20220423 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenCL OpenMP(2.0)
Delegates (built-in): bzlib cairo flif freetype gslib heic jng jp2 jpeg jxl lcms lqr lzma openexr pangocairo png ps raqm raw rsvg tiff webp xml zip zlib
Compiler: Visual Studio 2022 (193131105)
```

---


:mega: In this section, we are going to clone SAP Commerce Training Repository to our local machines.

## :golf: Goal

>Our objective is to completely and successfully clone the repository to the local machines in preparation for installing SAP commerce.

### Steps

1. Create an SSH key and [add it to your Gitlab account](https://docs.gitlab.com/ee/ssh/#add-an-ssh-key-to-your-gitlab-account)

2. Create a new folder with the name `y` where our project will be located and navigate into it.

```bash
$ mkdir y
$ cd y
```

> :bell: **Windows Users**
>
> To avoid issues with large path files, creating the project structure on the hard disk's root directory is recommended. For example, `C:\y`

3. Clone the repository inside the `y` folder. A new directory with the name `sap-commerce-training` was created with the Repository files

```bash
$ git clone git@gitlab.com:seidor-cx/sap-commerce-training.git
```

## :white_check_mark: Check your work
Navigate to the `sap-commerce-training` directory and list the contents

```bash
$ cd sap-commerce-training
$ ls -al
total 16
drwxr-xr-x   6 johndoe  staff   192 Mar  3 14:17 .
drwxr-xr-x  14 johndoe  staff   448 Mar  3 14:13 ..
drwxr-xr-x  12 johndoe  staff   384 Mar  3 14:17 .git
-rw-r--r--   1 johndoe  staff  1584 Mar  3 14:17 .gitignore
-rw-r--r--   1 johndoe  staff  2734 Mar  3 14:17 README.md
drwxr-xr-x   3 johndoe  staff    96 Mar  3 14:17 cx
```

---

:arrow_right: Continue with [Step 3. E-commerce Accelerator](/Introduction:-First-steps/E-commerce-Accelerator)


:mega: In this section, you will learn how to create brand new e-commerce based on an Accelerator.

## Goal :golf:

> Our objective is not only to successfully install the Accelerator, but also to have a first-step understanding of SAP commerce.

### :capital_abcd: Introduction

Accelerator is a pre-packaged, fully functional e-commerce ready to be modified to our business needs. Let's say that the **Accelerator** is _the starting point for any SAP Commerce project_. For more information on Accelerator, please check this :link: [document](https://help.sap.com/viewer/4c33bf189ab9409e84e589295c36d96e/2105/en-US/8af1f166866910149c3d933b84aa5942.html).

### Steps

Before starting the following steps, please check that you are currently in the `sap-commerce-training` directory.

1. Extract your SAP Commerce 2105 zip file inside the `cx` directory to the current working directory

```shell
$ unzip -qq cx/CXCOMM210500P_20-70005661.zip
```

Directory contents should include the following files and folders.

```shell
$ ls -al
total 46488
drwxr-xr-x  13 johndoe  staff       416 Mar  3 14:21 .
drwxr-xr-x  14 johndoe  staff       448 Mar  3 14:13 ..
drwxr-xr-x  14 johndoe  staff       448 Mar  3 14:22 .git
-rw-r--r--   1 johndoe  staff      1584 Mar  3 14:17 .gitignore
-rw-r--r--   1 johndoe  staff       229 Oct 19 16:31 README
-rw-r--r--   1 johndoe  staff      2734 Mar  3 14:17 README.md
-rw-r--r--   1 johndoe  staff  23788379 Oct 21 12:35 SIGNATURE.SMF
drwxr-xr-x   4 johndoe  staff       128 Oct 20 02:20 build-tools
drwxr-xr-x   3 johndoe  staff        96 Mar  3 14:17 cx
drwxr-xr-x   3 johndoe  staff        96 Oct 20 02:23 hybris
drwxr-xr-x   3 johndoe  staff        96 Oct 19 15:55 hybris-sbg
drwxr-xr-x  18 johndoe  staff       576 Oct 20 02:23 installer
drwxr-xr-x  32 johndoe  staff      1024 Oct 19 16:31 licenses
```

2. Navigate to the `platform` folder and create `config` folder using the `ant modulegen` command.

```shell
$ cd hybris/bin/platform
$ ant modulegen
```

You will be prompted to choose the configuration template.

> :question: _Which Templates SAP Commerce provides?_
>
> **develop**: This template is optimized for use in a development environment, where you use your SAP Commerce installation internally only, and it undergoes frequent changes. Performance and debugging aspects generally rank higher than security in such an environment.
>
> **production**: This template is optimized for use in a production environment, where your SAP Commerce installation is available to external users. In this environment, security is the priority, and the installation requires more system memory than it does in a development configuration. Changes are few in number, usually when deploying software updates. This template does not contain configuration files for debugging operations in your application server.
>
> You can find more information in this :link: [document](https://help.sap.com/viewer/b490bb4e85bc42a7aa09d513d0bcb18e/2105/en-US/8b8a17848669101495abb16de725fd00.html)

```shell
Buildfile: /Users/johndoe/y/sap-commerce-training/hybris/bin/platform/build.xml
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/log
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/data
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/roles
    [input] 
    [input]  **** NO CONFIG FOLDER FOUND ****
    [input] 
    [input]  No config folder was found at /Users/johndoe/y/sap-commerce-training/hybris/config.
    [input]  A "fresh" folder containing basic configuration files and the SAP Commerce
    [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] to use the default value ([develop], production)
```

3. Press `Enter` to continue and use the default one (develop).

```shell
[ycopyfromtemplate] 
[ycopyfromtemplate] Copying template:
[ycopyfromtemplate] 
[ycopyfromtemplate] Template dir: /Users/johndoe/y/sap-commerce-training/hybris/bin/platform/resources/configtemplates/develop
[ycopyfromtemplate] Target dir: /Users/johndoe/y/sap-commerce-training/hybris/config
[ycopyfromtemplate] Default properties: /Users/johndoe/y/sap-commerce-training/hybris/bin/platform/resources/configtemplates/develop/default.properties
[ycopyfromtemplate] Custom properties: 
[ycopyfromtemplate]   
[ycopyfromtemplate] 
[ycopyfromtemplate] Templates:
[ycopyfromtemplate]   /Users/johndoe/y/sap-commerce-training/hybris/bin/platform/resources/configtemplates/develop/local.properties.tmpl
[ycopyfromtemplate] 
[ycopyfromtemplate] Properties:
[ycopyfromtemplate]   mediaLocationHash : ffdd1f613048424b8eb7756a920c8a4c4
[ycopyfromtemplate] 
[ycopyfromtemplate] Additional paths to be copied:
[ycopyfromtemplate] 
     [copy] Copying 1 file to /Users/johndoe/y/sap-commerce-training/hybris/config
[ysetplatformproperties] Starting platform in modulegen mode...
[ysetplatformproperties] setting platform.extensions.scan.dirs=/Users/johndoe/y/sap-commerce-training/hybris/bin
[ysetplatformproperties]  - explicitly loading modulegen template extension : yacceleratorordermanagement
[ysetplatformproperties]  - explicitly loading modulegen template extension : yacceleratortest
[ysetplatformproperties]  - explicitly loading modulegen template extension : yacceleratorcore
[ysetplatformproperties]  - explicitly loading modulegen template extension : yacceleratorbackoffice
[ysetplatformproperties]  - explicitly loading modulegen template extension : yacceleratorinitialdata
[ysetplatformproperties]  - explicitly loading modulegen template extension : yacceleratorfacades
[ysetplatformproperties]  - explicitly loading modulegen template extension : yacceleratorfulfilmentprocess
[ysetplatformproperties]  - explicitly loading modulegen template extension : yacceleratorstorefront
[ysetplatformproperties]  - explicitly loading modulegen template extension : ycommercewebservicestest
[ysetplatformproperties]  - explicitly loading modulegen template extension : ycommercewebservices
[ysetplatformproperties] Web root <web> of the extension <testweb> has been explicitely disabled
     [echo] ---------------------------------------------------------------
     [echo] hybris Platform Environment
     [echo] ---------------------------------------------------------------
     [echo] OS family:                 unix
     [echo] Java platform:             OpenJDK Runtime Environment, 11.0.12+7-LTS-sapmachine
     [echo] Java compiler:             org.eclipse.jdt.core.JDTCompilerAdapter
     [echo] Build target:              11
     [echo] Compilation mode:          strict
     [echo] hybris Platform directory: /Users/johndoe/y/sap-commerce-training/hybris/bin/platform
     [echo] hybris Platform version:   2105.2
     [echo] Ant version:               Apache Ant(TM) version 1.10.11 compiled on July 10 2021
     [echo] Ant memory settings:       ${env.ANT_OPTS}
     [echo] ---------------------------------------------------------------
     [echo] Extension file used: /Users/johndoe/y/sap-commerce-training/hybris/config/localextensions.xml
     [echo] Platform home: /Users/johndoe/y/sap-commerce-training/hybris/bin/platform
     [echo] Log folder: /Users/johndoe/y/sap-commerce-training/hybris/log
     [echo] Data folder: /Users/johndoe/y/sap-commerce-training/hybris/data
     [echo] Config folder: /Users/johndoe/y/sap-commerce-training/hybris/config
     [echo] Bin folder: /Users/johndoe/y/sap-commerce-training/hybris/bin
     [echo] Temp folder: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris
     [echo] Boostrap bin folder: /Users/johndoe/y/sap-commerce-training/hybris/bin/platform/bootstrap/bin
     [echo] Roles folder: /Users/johndoe/y/sap-commerce-training/hybris/bin/platform/../../roles
     [echo] ---------------------------------------------------------------
     [echo] --- Extensions in dependency order ( options: 
     [echo] ---  @deprecated: is deprecated, p: platform extension,*: auto-required 
     [echo] ---  ?: lazy-loaded, i: got items.xml, b: got beans.xml, c: got core module 
     [echo] ---  w: got web module ) 
     [echo] ---------------------------------------------------------------
     [echo] core 2105.2 [p*cib]
     [echo] commons 2105.2 [p*ci]
     [echo] deliveryzone 2105.2 [p*ci]
     [echo] maintenanceweb 2105.2 [p*w]
     [echo] mediaweb 2105.2 [p*cw]
     [echo] paymentstandard 2105.2 [p*ci]
     [echo] scripting 2105.2 [p*ci]
     [echo] processing->(scripting,commons) 2105.2 [p*cibw]
     [echo] impex->processing 2105.2 [p*ci]
     [echo] testweb 2105.2 [p*w]
     [echo] validation->impex 2105.2 [p*ci]
     [echo] catalog->validation 2105.2 [p*cib]
     [echo] advancedsavedquery->catalog 2105.2 [p*ci]
     [echo] europe1->catalog 2105.2 [p*ci]
     [echo] platformservices->(paymentstandard,deliveryzone,europe1) 2105.2 [p*cb]
     [echo] hac->platformservices 2105.2 [p*cw]
     [echo] oauth2->platformservices 2105.2 [p*cibw]
     [echo] workflow->(catalog,platformservices) 2105.2 [p*ci]
     [echo] comments->workflow 2105.2 [p*ci]
     [echo] apiregistryservices <-?-(basecommerce,apiregistrybackoffice) 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/api-registry/apiregistryservices
     [echo] auditreportservices <-?-backoffice 2105.2 [?ci] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/platform/auditreportservices
     [echo] backoffice->auditreportservices <-?-(platformbackoffice,basecommercebackoffice,voucherbackoffice,promotionsbackoffice,acceleratorbackoffice) 2105.2 [?ciw] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/backoffice-framework/backoffice
     [echo] basecommerce->apiregistryservices <-?-(cms2,payment,basecommercebackoffice,commerceservices) 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-commerce/basecommerce
     [echo] cms2->basecommerce <-?-(cms2lib,acceleratorservices,ycommercewebservicestest) 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/web-content-management-system/cms2
     [echo] cms2lib->cms2 <-?-(cmsfacades,acceleratorcms) 2105.2 [?ci] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/web-content-management-system/cms2lib
     [echo] customerreview <-?-commerceservices 2105.2 [?ci] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-commerce/customerreview
     [echo] embeddedserver <-?-tomcatembeddedserver 2105.2 [?cibw] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/platform/embeddedserver
     [echo] payment->basecommerce <-?-commerceservices 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-commerce/payment
     [echo] platformbackoffice->backoffice <-?-(apiregistrybackoffice,searchbackoffice,solrfacetsearchbackoffice,voucherbackoffice) 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/backoffice-framework/platformbackoffice
     [echo] apiregistrybackoffice->(apiregistryservices,platformbackoffice) <-?-basecommercebackoffice 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/api-registry/apiregistrybackoffice
     [echo] basecommercebackoffice->(backoffice,basecommerce,apiregistrybackoffice) <-?-commerceservicesbackoffice 2105.2 [?c] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-commerce/basecommercebackoffice
     [echo] searchservices <-?-(searchbackoffice,commerceservices) 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/search-services/searchservices
     [echo] searchbackoffice->(searchservices,platformbackoffice) <-?-commerceservicesbackoffice 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/search-services/searchbackoffice
     [echo] solrfacetsearch <-?-(solrfacetsearchbackoffice,commerceservices) 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/search-and-navigation/solrfacetsearch
     [echo] solrfacetsearchbackoffice->(solrfacetsearch,platformbackoffice) <-?-commerceservicesbackoffice 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/search-and-navigation/solrfacetsearchbackoffice
     [echo] springintegrationlibs <-?-acceleratorservices 2105.2 [?] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/platform/springintegrationlibs
     [echo] tomcatembeddedserver->embeddedserver <-?-webservicescommons 2105.2 [?cibw] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/platform/tomcatembeddedserver
     [echo] voucher <-?-(promotions,voucherbackoffice) 2105.2 [?ci] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-commerce/voucher
     [echo] promotions->voucher <-?-(commerceservices,promotionsbackoffice) 2105.2 [?ci] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-commerce/promotions
     [echo] commerceservices->(basecommerce,promotions,searchservices,solrfacetsearch,customerreview,payment) <-?-(commercefacades,ticketsystem,acceleratorservices,commerceservicesbackoffice,commercewebservicescommons) 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/commerce-services/commerceservices
     [echo] commercefacades->commerceservices <-?-(cmsfacades,ordermanagementfacades,acceleratorfacades,yacceleratorordermanagement,ycommercewebservices) 2105.2 [?cb] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/commerce-services/commercefacades
     [echo] cmsfacades->(cms2lib,commercefacades) <-?-acceleratorfacades 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/web-content-management-system/cmsfacades
     [echo] ordermanagementfacades->commercefacades <-?-ycommercewebservices 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/order-management/ordermanagementfacades
     [echo] ticketsystem->commerceservices <-?-(acceleratorservices,yacceleratorfulfilmentprocess) 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/customer-service/ticketsystem
     [echo] acceleratorservices->(commerceservices,cms2,ticketsystem,springintegrationlibs) <-?-(acceleratorcms,apparelstore,consignmenttrackingservices,electronicsstore,yacceleratorfulfilmentprocess,yacceleratorordermanagement) 2105.2 [?cibw] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/core-accelerator/acceleratorservices
     [echo] acceleratorcms->(acceleratorservices,cms2lib) <-?-(acceleratorfacades,acceleratorbackoffice,yacceleratorcore) 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/core-accelerator/acceleratorcms
     [echo] acceleratorfacades->(cmsfacades,acceleratorcms,commercefacades) <-?-(acceleratorstorefrontcommons,yacceleratorfacades) 2105.2 [?cb] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/core-accelerator/acceleratorfacades
     [echo] acceleratorstorefrontcommons->acceleratorfacades <-?-yacceleratorstorefront 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/core-accelerator/acceleratorstorefrontcommons
     [echo] apparelstore->acceleratorservices <-?-yacceleratortest 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/b2c-accelerator/apparelstore
     [echo] consignmenttrackingservices->acceleratorservices <-?-warehousing 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/consignment-tracking/consignmenttrackingservices
     [echo] electronicsstore->acceleratorservices <-?-yacceleratortest 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/b2c-accelerator/electronicsstore
     [echo] voucherbackoffice->(backoffice,voucher,platformbackoffice) <-?-promotionsbackoffice 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-commerce/voucherbackoffice
     [echo] promotionsbackoffice->(backoffice,promotions,voucherbackoffice) <-?-commerceservicesbackoffice 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-commerce/promotionsbackoffice
     [echo] commerceservicesbackoffice->(commerceservices,promotionsbackoffice,basecommercebackoffice,searchbackoffice,solrfacetsearchbackoffice) <-?-acceleratorbackoffice 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/commerce-services/commerceservicesbackoffice
     [echo] acceleratorbackoffice->(backoffice,commerceservicesbackoffice,acceleratorcms) <-?-yacceleratorbackoffice 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/core-accelerator/acceleratorbackoffice
     [echo] warehousing->consignmenttrackingservices <-?-yacceleratorordermanagement 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/order-management/warehousing
     [echo] webservicescommons->(platformservices,tomcatembeddedserver) <-?-commercewebservicescommons 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/web-services-commons/webservicescommons
     [echo] commercewebservicescommons->(commerceservices,webservicescommons) <-?-ycommercewebservices 2105.2 [?cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/commerce-services/commercewebservicescommons
     [echo] yacceleratorcore->acceleratorcms 2105.2 [ci] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorcore
     [echo] yacceleratorbackoffice->(acceleratorbackoffice,yacceleratorcore) 2105.2 [cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorbackoffice
     [echo] yacceleratorfacades->(acceleratorfacades,yacceleratorcore) 2105.2 [cb] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorfacades
     [echo] yacceleratorfulfilmentprocess->(acceleratorservices,ticketsystem) 2105.2 [ci] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorfulfilmentprocess
     [echo] yacceleratorinitialdata->yacceleratorcore 2105.2 [c] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorinitialdata
     [echo] yacceleratorordermanagement->(acceleratorservices,warehousing,commercefacades) 2105.2 [ci] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/order-management/yacceleratorordermanagement
     [echo] yacceleratorstorefront->(acceleratorstorefrontcommons,yacceleratorfacades) 2105.2 [w] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorstorefront
     [echo] yacceleratortest->(electronicsstore,apparelstore,yacceleratorfacades) 2105.2 [c] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratortest
     [echo] ycommercewebservices->(ordermanagementfacades,commercewebservicescommons,commercefacades) 2105.2 [cibw] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/commerce-services/ycommercewebservices
     [echo] ycommercewebservicestest->(ycommercewebservices,cms2) 2105.2 [cib] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/commerce-services/ycommercewebservicestest
     [echo] yempty 2105.2 [cibw] path:/Users/johndoe/y/sap-commerce-training/hybris/bin/modules/platform/yempty
     [echo] ---------------------------------------------------------------
```

After creating the default configuration, it's time to create the Spring extension for the e-commerce.

```shell
modulegen:
    [input] Please choose a template for generation.
    [input] Press [Enter] to use the default value ([accelerator], acceleratorordermanagement, commercewebservices)
```

4. Press `Enter` to generate the e-commerce from the default `accelerator` template.

```shell
    [input] Please choose the name of your module extension. It has to start with a letter followed by letters and/or numbers.
    [input] Press [Enter] to use the default value [training]
```

5. Press `Enter` to generate our modules with the default `training` name.

if you press enter enter, your base package name will be change!

```shell
    [input] Please choose the base package name of your extensions. It has to fulfill the java package name convention. Each extension in the module will add its name to this package.
    [input] Press [Enter] to use the default value [org.training]
com.seidor.training
```

6. Enter `com.seidor.training` as the package name convention.

```shell
[echo] Using extension template source: /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorcore
     [echo] Using extension template source: /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorbackoffice
     [echo] Using extension template source: /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorfacades
     [echo] Using extension template source: /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorfulfilmentprocess
     [echo] Using extension template source: /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorinitialdata
     [echo] Using extension template source: /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorstorefront
     [echo] Using extension template source: /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratortest
     [echo] Processing extension yacceleratorcore
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorcore
     [echo] Copying template files from /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorcore to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorcore
     [copy] Copying 505 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorcore
     [copy] Copied 68 empty directories to 1 empty directory under /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorcore
     [echo] Replacing tokens in template files: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen
  [replace] Replaced 328 occurrences in 100 files.
     [copy] Copying 505 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen_final/yacceleratorcore
     [echo] Processing extension yacceleratorbackoffice
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorbackoffice
     [echo] Copying template files from /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorbackoffice to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorbackoffice
     [copy] Copying 78 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorbackoffice
     [copy] Copied 34 empty directories to 3 empty directories under /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorbackoffice
     [echo] Replacing tokens in template files: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen
  [replace] Replaced 66 occurrences in 15 files.
     [copy] Copying 78 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen_final/yacceleratorbackoffice
     [echo] Processing extension yacceleratorfacades
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorfacades
     [echo] Copying template files from /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorfacades to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorfacades
     [copy] Copying 41 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorfacades
     [copy] Copied 27 empty directories to 1 empty directory under /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorfacades
     [echo] Replacing tokens in template files: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen
  [replace] Replaced 110 occurrences in 35 files.
     [copy] Copying 41 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen_final/yacceleratorfacades
     [echo] Processing extension yacceleratorfulfilmentprocess
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorfulfilmentprocess
     [echo] Copying template files from /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorfulfilmentprocess to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorfulfilmentprocess
     [copy] Copying 171 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorfulfilmentprocess
     [copy] Copied 39 empty directories to 1 empty directory under /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorfulfilmentprocess
     [echo] Replacing tokens in template files: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen
  [replace] Replaced 381 occurrences in 134 files.
     [copy] Copying 171 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen_final/yacceleratorfulfilmentprocess
     [echo] Processing extension yacceleratorinitialdata
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorinitialdata
     [echo] Copying template files from /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorinitialdata to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorinitialdata
     [copy] Copying 123 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorinitialdata
     [copy] Copied 29 empty directories to 1 empty directory under /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorinitialdata
     [echo] Replacing tokens in template files: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen
  [replace] Replaced 108 occurrences in 26 files.
     [copy] Copying 123 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen_final/yacceleratorinitialdata
     [echo] Processing extension yacceleratorstorefront
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorstorefront
     [echo] Copying template files from /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratorstorefront to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorstorefront
     [copy] Copying 1157 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorstorefront
     [copy] Copied 263 empty directories to 2 empty directories under /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratorstorefront
     [echo] Replacing tokens in template files: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen
  [replace] Replaced 653 occurrences in 215 files.
     [copy] Copying 1157 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen_final/yacceleratorstorefront
     [echo] Processing extension yacceleratortest
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratortest
     [echo] Copying template files from /Users/johndoe/y/sap-commerce-training/hybris/bin/modules/base-accelerator/yacceleratortest to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratortest
     [copy] Copying 75 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratortest
     [copy] Copied 19 empty directories to 1 empty directory under /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen/yacceleratortest
     [echo] Replacing tokens in template files: /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen
  [replace] Replaced 72 occurrences in 14 files.
     [copy] Copying 75 files to /Users/johndoe/y/sap-commerce-training/hybris/temp/hybris/extgen_final/yacceleratortest
     [echo] Processing cross dependencies on extension yacceleratorcore
  [replace] Replaced 3 occurrences in 3 files.
  [replace] Replaced 3 occurrences in 3 files.
  [replace] Replaced 3 occurrences in 3 files.
     [echo] Processing cross dependencies on extension yacceleratorbackoffice
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
     [echo] Processing cross dependencies on extension yacceleratorfacades
  [replace] Replaced 2 occurrences in 2 files.
  [replace] Replaced 2 occurrences in 2 files.
  [replace] Replaced 5 occurrences in 5 files.
     [echo] Processing cross dependencies on extension yacceleratorfulfilmentprocess
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
     [echo] Processing cross dependencies on extension yacceleratorinitialdata
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
     [echo] Processing cross dependencies on extension yacceleratorstorefront
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
     [echo] Processing cross dependencies on extension yacceleratortest
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
  [replace] Replaced 0 occurrences in 0 files.
     [echo] Processing final copy for extension yacceleratorcore
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingcore/lib
     [copy] Copying 504 files to /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingcore
     [echo] Processing final copy for extension yacceleratorbackoffice
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingbackoffice/lib
     [copy] Copying 77 files to /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingbackoffice
     [echo] Processing final copy for extension yacceleratorfacades
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingfacades/lib
     [copy] Copying 40 files to /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingfacades
     [echo] Processing final copy for extension yacceleratorfulfilmentprocess
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingfulfilmentprocess/lib
     [copy] Copying 170 files to /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingfulfilmentprocess
     [echo] Processing final copy for extension yacceleratorinitialdata
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/traininginitialdata/lib
     [copy] Copying 122 files to /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/traininginitialdata
     [echo] Processing final copy for extension yacceleratorstorefront
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingstorefront/lib
     [copy] Copying 1156 files to /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingstorefront
     [echo] Processing final copy for extension yacceleratortest
    [mkdir] Created dir: /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingtest/lib
     [copy] Copying 74 files to /Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingtest
```

:arrow_down: Last part of the output should look like this (no worries, we don't need to follow this steps right now)

```shell
     [echo]   
     [echo]   Next steps:
     [echo]   
     [echo] 1) Add your extension to your /Users/johndoe/y/sap-commerce-training/hybris/config/localextensions.xml
     [echo]     
     [echo] <extension dir="/Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingcore"/>
     [echo] <extension dir="/Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingbackoffice"/>
     [echo] <extension dir="/Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingfacades"/>
     [echo] <extension dir="/Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingfulfilmentprocess"/>
     [echo] <extension dir="/Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/traininginitialdata"/>
     [echo] <extension dir="/Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingstorefront"/>
     [echo] <extension dir="/Users/johndoe/y/sap-commerce-training/hybris/bin/custom/training/trainingtest"/>
     [echo] 
     [echo] 2) Remove the following extensions from your /Users/johndoe/y/sap-commerce-training/hybris/config/localextensions.xml
     [echo]     yacceleratorcore,yacceleratorbackoffice,yacceleratorfacades,yacceleratorfulfilmentprocess,yacceleratorinitialdata,yacceleratorstorefront,yacceleratortest
     [echo] 
     [echo] 3) Make sure the applicationserver is stopped before you build the extension the first time.
     [echo]   
     [echo] 4) Perform 'ant' in your hybris/platform directory.
     [echo] 
     [echo] 5) Restart the applicationserver
     [echo]     
     [echo]            
```

:arrow_up: As you can see, a lot of directories where created under the `sap-commerce-training/hybris/bin/custom/training/` directory. We will go deeper into each one of them while following the Steps of the Learning Journey.

7. Using GIT, commit all the changes to your local repository

> :question: **Not familiar with GIT?**
>
> No worries, we are going to explain the GIT basics in a future Step of the Training. For now, just keep in mind that we are _saving_ our work in a local database for easier tracking of changes in the future

```shell
$ cd ~/y/sap-commerce-training
$ git add .
$ git commit -m "initial commit for accelerator"

[main e3d1125] initial commit for accelerator
 1955 files changed, 318347 insertions(+)
 create mode 100644 .gitignore
 create mode 100644 hybris/bin/custom/training/trainingbackoffice/.project
 create mode 100644 hybris/bin/custom/training/trainingbackoffice/.settings/org.eclipse.core.resources.prefs
 create mode 100644 hybris/bin/custom/training/trainingbackoffice/.settings/org.eclipse.jdt.core.prefs
 create mode 100644 hybris/bin/custom/training/trainingbackoffice/.settings/org.eclipse.jdt.ui.prefs
...
```

## :white_check_mark: Check your work

Verify that there is nothing else to commit

```shell
$ git status

On branch main
Your branch is ahead of 'origin/main' by 1 commit.
  (use "git push" to publish your local commits)

nothing to commit, working tree clean
```

## :book: Additional resources

### Apache Ant

Have you noticed that we use `ant` command in this section? 

Apache Ant is a tool used in programming to perform mechanical and repetitive tasks, usually during the compile and build phase.  And we are going to use `ant` a lot in the future, so if you have some spare time, please take a look at the first learning pill related to [Apache Ant](/Learning-Pills/Ant).

---

:arrow_right: Continue with [Step 4: Extensions and Environment Properties](/Introduction:-First-steps/Extensions-and-environment-properties)


:mega: In this section, you have to know that **SAP Commerce** manages different features of the e-commerce as extensions. To control which extensions the project will use, we have to set them up in the `localextensions.xml` file of the project.

> :question: **What could be these e-commerce features?**
>
> Features can be specific functionalities like Wishlist, Product Reservation, Recommendations, Payment integrations, etc...

Use the following document [Day2_Platform_Basics_12-19.pdf](uploads/af010b7ad54de16774bb54b65d867602/Day2_Platform_Basics_12-19.pdf) as a reference to complete the goal of this section.

## :golf: Goal

> Our objective is to set up our e-commerce by using the generated extensions created in the previous step: [E-commerce Accelerator](/Introduction:-First-steps/E-commerce-Accelerator) and configuring environment properties.

### Steps

1. Add the custom extensions into our project by adding the following content into the file `y/sap-commerce-training/hybris/config/localextensions.xml`

```xml
<?xml version="1.0" encoding="UTF-8"?>
<hybrisconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="resources/schemas/extensions.xsd">
	<extensions>
		<!--
				All extensions located in ${HYBRIS_BIN_DIR}/platform/ext are automatically loaded.
				More information about how to configure available extensions can be found here: https://wiki.hybris.com/x/nZVzC
		-->
		<path dir="${HYBRIS_BIN_DIR}" />

		<extension name="solrserver"/>

		<extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingcore"/>
                <extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingbackoffice"/>
                <extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingfacades"/>
                <extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingfulfilmentprocess"/>
                <extension dir="${HYBRIS_BIN_DIR}/custom/training/traininginitialdata"/>
                <extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingstorefront"/>
                <extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingtest"/>
	</extensions>
</hybrisconfig>
```

:arrow_up: Previous extensions enable specific functionality; here is a brief explanation of all of them:

- **trainingcore**: the core logic of all the processes in **SAP Commerce**.

- **trainingbackoffice**: provides an interface for the configuration and maintenance of the e-commerce.

- **trainingfacades**: an abstraction layer that provides a simplified interface to the underlying implementation of the business logic.

- **trainingfulfilmentprocess**: executes the business processes related to fulfilling an e-commerce Order.

- **traininginitialdata**: contains the initial and sample data of the e-commerce (Products, Categories, Content, etc...). This data will be loaded into the Database whenever we update or initialize the system.

- **trainingstorefront**: accepts (HTTP) client requests and serves the website.

- **trainingtest**: contains all the sample data of this accelerator; we can exclude it if we don't need sample data.

- **solrserver**: extension from **SAP Commerce** (not generated by us in the previous step) that will allow us to navigate between Categories and search Products on the e-commerce.

> :question: **What other extensions of SAP Commerce are available?**
>
> There are almost a thousand extensions/addons to use, for a complete list take a look [here](https://help.sap.com/viewer/c5613bd3cc9942efb74d017b40eb0892/2105/en-US/8bc0c14886691014a0d4f274a720596f.html)

2. Configure environment variables (properties) for project initialization by adding the following content to the `y/sap-commerce-training/hybris/config/local.properties` file

```bash
initialpassword.admin=nimda
promotions.legacy.mode=true
ansi.colors=true
```

> :bookmark:  Configuring the Behaviour of **SAP Commerce**
>
> **SAP Commerce** has a wide array of configuration parameters that allow specifying runtime settings for various parts of the solution. Check this [document](https://help.sap.com/viewer/b490bb4e85bc42a7aa09d513d0bcb18e/2105/en-US/8b8e13c9866910149d40b151a9196543.html) for additional information. 

:ok_hand: You were able to set up both extensions and configuration of **SAP Commerce**. This will be loaded whenever we run the server.

## :white_check_mark: Check your work

Verify that your `y/sap-commerce-training/hybris/config/localextensions.xml` looks like this:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<hybrisconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="resources/schemas/extensions.xsd">
	<extensions>
		<!--
				All extensions located in ${HYBRIS_BIN_DIR}/platform/ext are automatically loaded.
				More information about how to configure available extensions can be found here : https://wiki.hybris.com/x/nZVzC
		-->

		<path dir="${HYBRIS_BIN_DIR}" />

		<extension name="solrserver"/>

		<extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingcore"/>
        	<extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingbackoffice"/>
        	<extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingfacades"/>
        	<extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingfulfilmentprocess"/>
        	<extension dir="${HYBRIS_BIN_DIR}/custom/training/traininginitialdata"/>
        	<extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingstorefront"/>
        	<extension dir="${HYBRIS_BIN_DIR}/custom/training/trainingtest"/>
	</extensions>
</hybrisconfig>
```

And your `y/sap-commerce-training/hybris/config/local.properties` looks like this:

```bash
# -----------------------------------------------------------------------
# Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved.
# -----------------------------------------------------------------------


# place your custom properties into this file instead of modifying the project.properties
# all properties in this file have higher priority and will overwrite the platform/project.properties settings.

mykey=myvalue
media.default.storage.location.hash.salt=632e8a15f51845d9ad0f420f867b848af

initialpassword.admin=nimda
promotions.legacy.mode=true
ansi.colors=true

#hac.webroot=/hac
```

Cheers, your **SAP Commerce** setup is complete.

### :floppy_disk: Save your work

Commit the changes via **Git** by executing the following commands

```shell
$ git add .
$ git commit -m "Extensions and Environment Properties"
```

---

:arrow_right: Continue with [Step 5: Start up your server](/Introduction:-First-steps/Start-Up-Your-Server)



:mega: In this section, you will learn how to initialize the Database and run the e-commerce for the first time.

## :golf: Goal

> Our objective is to access the e-commerce with a web browser by compiling, initializing and starting the server.

### Steps

1. Navigate to `platform` directory

```shell
$ cd ~/y/sap-commerce-training/hybris/bin/platform
```

2. Compile the project using `ant clean all` command

```shell
$ ant clean all
```

It will take about 2 minutes and you should be able to see the result as follows:

```shell
     [echo] copying from /Users/rick/y/sap-commerce-training/hybris/config/tomcat to /Users/rick/y/sap-commerce-training/hybris/bin/platform/tomcat
     [copy] Copying 13 files to /Users/rick/y/sap-commerce-training/hybris/bin/platform/tomcat
     [copy] Copying 4 files to /Users/rick/y/sap-commerce-training/hybris/bin/platform/tomcat
     [copy] Copying 5 files to /Users/rick/y/sap-commerce-training/hybris/bin/platform/tomcat
     [copy] Copying 1 file to /Users/rick/y/sap-commerce-training/hybris/bin/platform/tomcat/lib
     [echo] 
     [echo] Embedded server does not seem to be running (no PID found). No restart necessary.
     [echo]                 

all:
     [echo] Build finished on 3-March-2022 13:29:39.
     [echo]         

BUILD SUCCESSFUL
Total time: 1 minute 41 seconds
```

3. After the project is compiled, let's initialize the system using `ant initialize` command

```shell
$ ant initialize
```

It may take about 15 minutes to initialize the system (depending on your system resources), after which you should able to see results as following:

```shell
...
[java] INFO  [main] [ApiregistryAfterInitEndEventListener] Returning apiregistryservices.events.exporting to true, it was overridden due to initialization process
     [java] INFO  [main] [MigrateFacetSortAttribute] 26 instances of SolrIndexedProperty were found that use SolrIndexedPropertyFacetSort : Alpha
     [java] INFO  [main] [MigrateFacetSortAttribute] Replacing with appropriate sortProvider : facetNameSortProviderAscending
     [java] INFO  [main] [OrgUnitAfterInitializationEndEventListener] Generating unit paths for OrgUnitModels after initialization.
     [java] INFO  [main] [OrgUnitHierarchyService] Generating path values for OrgUnitModels.
     [java] INFO  [main] [OrgUnitHierarchyService] Generating path values for OrgUnitModels took 4 ms.
     [java] INFO  [main] [Initialization] ###############################################################
     [java] INFO  [main] [Initialization] FINISHED. The initialization took: 0d 00h:11m:50s:762ms
     [java] INFO  [main] [Initialization] ###############################################################
     [java] shutting down hybris registry..
     [java] INFO  [main] [DefaultTaskService] Shutting down task engine for tenant master.
     [java] INFO  [main] [DefaultTaskService] Terminating task polling thread.
     [java] INFO  [main] [DefaultTaskService] Stopped task engine for tenant master.
     [java] INFO  [main] [DefaultSolrClientPool] Stopping Solr clients clean-up thread for tenant master
     [java] INFO  [main] [SolrClientsWrapper] Closing Solr clients [config=Default]
     [java] INFO  [main] [TenantStartupNotifier] Using default implementation of TenantStartupNotifier for tenant <<junit>>[-1605040844]
     [java] INFO  [main] [TenantStartupNotifier] Instantiating de.hybris.platform.core.BlockingTenantStartupNotifier for tenant <<junit>>[-1605040844].
     [java] INFO  [main] [TenantStartupNotifier] Using default implementation of TenantStartupNotifier for tenant <<t1>>[-1549247148]
     [java] INFO  [main] [TenantStartupNotifier] Instantiating de.hybris.platform.core.BlockingTenantStartupNotifier for tenant <<t1>>[-1549247148].
     [java] INFO  [main] [TenantStartupNotifier] Using default implementation of TenantStartupNotifier for tenant <<t2>>[-1102176102]
     [java] INFO  [main] [TenantStartupNotifier] Instantiating de.hybris.platform.core.BlockingTenantStartupNotifier for tenant <<t2>>[-1102176102].
     [java] INFO  [main] [TenantStartupNotifier] Using default implementation of TenantStartupNotifier for tenant <<foo>>[1288284528]
     [java] INFO  [main] [TenantStartupNotifier] Instantiating de.hybris.platform.core.BlockingTenantStartupNotifier for tenant <<foo>>[1288284528].
     [java] INFO  [AfterSaveEventPublisher-master] [DefaultAfterSaveListenerRegistry] AfterSaveEventPublisher-master has been interrupted - stopping now: sleep interrupted
     [java] INFO  [AfterSaveEventPublisher-master] [DefaultAfterSaveListenerRegistry] AfterSaveEventPublisher-master has been interrupted/terminated but without InterruptedException - stopping now.
     [java] INFO  [main] [DefaultCacheController] Removed listener from cache controller. Currently registered 1
     [java] INFO  [main] [DefaultClusterNodeManagementService] Unregistering assigned cluster node id 0...
     [java] shutting down hybris registry.

BUILD SUCCESSFUL
Total time: 12 minutes 38 seconds
```

4. Add the following content to your OS _hosts_ file

```shell
127.0.0.1   electronics.local
```

- **Linux and OSX**: /etc/hosts
- **Windows**: C:\\Windows\\System32\\drivers\\etc\\hosts

## :white_check_mark: Check your work

It's time to start the server and check what the e-commerce looks like by executing the following command in folder hybris/bin/platform:

```shell
$ ./hybrisserver.sh debug 
```
For Windows:
```shell
$ ./hybrisserver.bat debug 
```

> :exclamation: When developing SAP Commerce we will be using `debug` mode when running the server. This will allow us to debug our code using IntelliJ IDE.
>
> Other ways to start the server in a non-blocking way is by running `./hybrisserver.sh start`, and `./hybrisserver.sh stop` to stop it.

Once you see a message like the following, it means the server should be up and running smoothly.

```shell
...
INFO  [localhost-startStop-10] [HybrisContextLoaderListener] Registered HttpSession timeout listener for '/backoffice'
INFO  [localhost-startStop-10] [WebManager] Starting ZK 8.6.3 EE (build: 2019092411)
INFO  [localhost-startStop-10] [ConfigParser] Loading system default
INFO  [localhost-startStop-10] [ConfigParser] Parsing jar:file:/Users/rick/y/sap-commerce-training/hybris/bin/modules/backoffice-framework/backoffice/web/webroot/WEB-INF/lib/zul-8.6.3.jar!/metainfo/zk/zk.xml
INFO  [localhost-startStop-10] [ConfigParser] Parsing jar:file:/Users/rick/y/sap-commerce-training/hybris/bin/modules/backoffice-framework/backoffice/web/webroot/WEB-INF/lib/zkex-8.6.3.jar!/metainfo/zk/zk.xml
INFO  [localhost-startStop-10] [ConfigParser] Parsing jar:file:/Users/rick/y/sap-commerce-training/hybris/bin/modules/backoffice-framework/backoffice/web/webroot/WEB-INF/lib/zkmax-8.6.3-SAP.jar!/metainfo/zk/zk.xml
INFO  [localhost-startStop-10] [ConfigParser] Parsing jar:file:/Users/rick/y/sap-commerce-training/hybris/bin/modules/backoffice-framework/backoffice/web/webroot/WEB-INF/lib/cockpitframework-21.05.2-RC2.jar!/metainfo/zk/zk.xml
WARN  [localhost-startStop-10] [DefinitionLoaders] Component jasperreport ignored. Reason: unable to load org.zkoss.zkex.zul.Jasperreport due to java.lang.NoClassDefFoundError: net/sf/jasperreports/engine/JRDataSource
Mar 03, 2022 1:48:21 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-9001"]
Mar 03, 2022 1:48:21 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["https-jsse-nio-9002"]
Mar 03, 2022 1:48:21 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-127.0.0.1-8009"]
Mar 03, 2022 1:48:21 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 74958 ms
...
```

Congratulations!! You successfully start up the server. You can now open the website  <https://electronics.local:9002/trainingstorefront/?site=electronics> to review your work, and take some additional time to navigate between pages.

![image](uploads/09219fd56f521798eb9db5c8ecb44396/image.png)

### :floppy_disk: Save your work

Commit the changes via **Git** by executing the following commands

```shell
$ git add .
$ git commit -m "Start up your server : clean all initialize generated files"
```

---

:arrow_right: Continue with [Step 6: IntelliJ and Project Configuration](https://gitlab.com/seidor-cx/sap-commerce-training/-/wikis/Introduction:-First-steps/IntelliJ-and-Project-Configuration)


:mega: In this section, you will learn how to configure a project in IntelliJ IDEA, our favorite IDE (Integrated Development Environment) for developing on SAP Commerce.

IntelliJ IDEA is an IDE that was introduced by the company JetBrains, as the word Intelligent, IDEA provides more human-centered interfaces for better experience compared to other IDEs.

First, follow this [link](https://www.jetbrains.com/idea/download/) to download and install IntelliJ.

## :golf: Goal

> Our objective is to install additional development plugins for IntelliJ and import the core and custom (the ones we created previously) extensions of SAP Commerce.

### Plugin's Installation

IntelliJ IDEA provides many plugins to boost the development time. For SAP Commerce, we need to install additional plugins.

1. Open _Preferences_ → _Plugins_
2. Search and install the following _Plugins_ in the _Marketplace_ tab
   - SAP Commerce Developers Toolset
   - JRebel and XRebel for IntelliJ
   - SonarLint

![Screenshot_2022-02-25_at_11.19.49_AM](uploads/f81d5024af32ebe8437c7b8b54ae9538/Screenshot_2022-02-25_at_11.19.49_AM.png)

3. Restart IntelliJ

### SAP Commerce Project Import

Let's start to import the training project into Intellij IDEA

1. Click _File_ → _New_ → _Project from Existing Sources..._

![Screenshot_2022-02-25_at_11.23.52_AM](uploads/2a3039a030edea48807cdf7b777e8388/Screenshot_2022-02-25_at_11.23.52_AM.png)

2. Select the folder `sap-commerce-training` under `~/y` directory

![Screenshot_2022-02-25_at_2.59.52_PM](uploads/7d07bd364d9953a260f8d1b7f97e9bc5/Screenshot_2022-02-25_at_2.59.52_PM.png)

3. Select _Import project from external model_, then _hybris_, and click `Next`

![Screenshot_2022-02-25_at_11.24.11_AM](uploads/02e61200c24b6216ff2eca2cbb8e0d90/Screenshot_2022-02-25_at_11.24.11_AM.png)

4. Press `Next` on the Compilation screen.

![Screenshot_2022-02-25_at_2.51.25_PM](uploads/c7e7aa24ec79960d0d9c7755ac7229c8/Screenshot_2022-02-25_at_2.51.25_PM.png)

5. Make sure the _hybris Installation Directory_ is pointing to `/sap-commerce-training/hybris` and press `Next`.

![image](uploads/6fe6fa4b3d9ff343510dcf2a9abcb8a4/image.png)

6. Select all the extensions with the prefix **\*traning** and click `Next`.

![Screenshot_2022-02-25_at_11.28.06_AM](uploads/404c53555ddb40f4370a1e788a4c9629/Screenshot_2022-02-25_at_11.28.06_AM.png)

7. click `Next` (Nothing needs to be done here.)

![Screenshot_2022-02-25_at_11.29.30_AM](uploads/6ccc2b3f21881a5dcb6761ca056c8ad6/Screenshot_2022-02-25_at_11.29.30_AM.png)

8. Select SDK 11 and click `Next`.

![Screenshot_2022-02-25_at_2.53.26_PM](uploads/3d5fa0ec89202781d902044dfd553fd6/Screenshot_2022-02-25_at_2.53.26_PM.png)

9. Open the project in a new window or existing window

![Screenshot_2022-02-25_at_11.30.19_AM](uploads/5c00f16c44648302d4563d14e9014211/Screenshot_2022-02-25_at_11.30.19_AM.png)

## :white_check_mark: Check your work

The structure of your project should look like the image as below:

![image](uploads/802e9a78b7db8a0986f6dd95d18f8895/image.png)

:champagne: That's it, we have our e-commerce running and IDE configured to start working on our project. Congratulations!!

---

:arrow_right: Continue with the Learning Journey [Step 0: Intro](/Learning-Journey/Intro)