Home » Create New Addon

Create New Addon


Addons are used to extend the functionnalities of SAP Hybris platform without changing its source code, they are standard extensions and are loaded during the build phase, therefore they can be used to customize item types using their own items.xml file or beans using their own beans.xml file. From an addon you could:

  • add front end files (JSP, HTML, CSS and Javascript)
  • Generate or customize Facade transfert objects (DTO)
  • Generate or customize the data model
  • Declare new Spring Services or Facades or customize existing
  • Declare new Controllers or customize existing
  • Declare new Converters or populators or customize existing


An extension is an Addon when it requires the addonsupport extension and when the targeted extension requires the given addon.

First you need to generate a new extension based on the yaddon template,I called my extension cloudniraddon and choose com.cloudnir.cloudniraddon as a package name :

First create following Extension and package using ant extgen command


extension name : cloudniraddon
package name : com.cloudnir.cloudniraddon

After adding your addon to your eclipse environment and to your localextensions.xml file you’ll notice that it looks like any other extension except for the acceleratoraddon folder, this folder structure is a copy of the usual structure of a front end extension.

Installing an Addon:

Next step is to install your addon into the designated store front extension, for
this we use ant:


ant addoninstall -Daddonnames=”AddOnName1,AddOnName2″ -DaddonStorefront.yacceleratorstorefront =”B2CStorefront1,B2CStorefront2″
-DaddonStorefront.yb2bacceleratorstorefront=”B2BStorefront1,B2BStorefront2″

In my case my addon’s name is cloudniraddon and the store front extension I’m using is yacceleratorstorefront so I need to execute:

ant addoninstall -Daddonnames=”cloudniraddon” -DaddonStorefront.yacceleratorstorefront=”yacceleratorstorefront”

The addoninstall target does a couple a things :


•Generate a new project.properties file from the project.properties.template inside your addon.
•Configure the cloudniraddon web spring configuration cloudniraddon-web-spring.xml into
yacceleratorstorefront.additionalWebSpringConfigs
•Add cloudniraddon into extensioninfo.xml for yacceleratorstorefront
•Add cloudniraddon to addons.less for yacceleratorstorefront

Uninstalling an Addon:

If you need to uninstall an Addon you could use :

ant addonuninstall -Daddonnames=”cloudniraddon” -DaddonStorefront.yacceleratorstorefront=”yacceleratorstorefront”