About Extensions
An extension can contain business logic, type definitions, a web application, or a Backoffice Administration Cockpit configuration. That way, you link up in one place all of the functionality that covers a certain field of use, for example a storefront.
Because extensions are independent of one another by default, you can migrate an extension from one SAP Commerce version to another.
Basic Structure of an Extension
An extension based on the yempty extension template contains the following directories and files:
Figure: Basic directory structure of an extension.
|
Directory or File of a Blank Extension |
Description |
See Also |
|---|---|---|
|
/.externalToolBuilders directory |
Contains the Eclipse builder that automatically generates SAP Commerce Models if any extension's items.xml file has been modified in Eclipse. |
|
|
/.settings directory |
Contains configuration files for Eclipse in general and Eclipse-related Spring configuration files. |
|
|
/lib directory |
All external library files should be stored here. |
|
|
/resources directory |
Contains the <$extension> -items.xml file and the localization for the extension types (within the /localization subdirectory). |
|
|
/src directory |
Contains the source code files for the coremodule extension component. |
|
|
/testsrc directory |
JUnit test files for the extension are located here. |
|
|
/web directory |
This directory contains the webmodule extension component parts (JSP files, libraries). Sources and resources from this directory are only accessible to a Web application containing the extension. They cannot be accessed from another extension. |
|
|
.classpath file |
Classpath file for Eclipse. |
|
|
.project file |
Project file for Eclipse. |
|
|
.springBeans file |
Configuration for Spring IDE Eclipse plugin. |
|
|
buildcallbacks.xml |
Allows you to implement custom build framework logic. |
|
|
extensioninfo.xml file |
Configures the extension components. This file is used by the build framework. It also determines which extensions are required for proper functioning. |
|
|
project.properties file |
Configuration properties for the extension. |
|
|
external-dependencies.xml file |
Third party dependencies of SAP Commerce extensions are defined here. |
The directories and files above exist after the extension is generated (or after ant clean is run). During an extension build, some additional directories and files are created:
Figure: Files and directories created during an extension build.
|
Directory or File Created During an Extension Build |
Description |
|---|---|
|
/classes directory |
Contains all .class files for src, testsrc and gensrc folders of the extension. |
|
build.xml file |
This build file calls the Platform build file for actual action and provides the necessary parameters to it. This way ant targets are consistent throughout the entire installation. |
|
extensioninfo.xsd |
Copied from <${HYBRIS_BIN_DIR}> /platform/resources/schemas. Allows validating the extensioninfo.xml file. |
|
platformhome.properties |
Automatically generated file. It contains only the relative path to <${HYBRIS_BIN_DIR}>/platform. Do not modify it. |
