What is the difference between extgen and modulegen?

Extgen is an inbuilt tool of Sap hybris Commerce Suite to generate one extension/addon based on the template given. Extgen available templates are yempty, yaddon, ybackoffice, cockpit, ycommerceservices etc.

Generate the extension using the Ant extgen command


1. Go to hybris\bin\platform path in terminal and use ant extgen command .

[input] Please choose a template for generation.
    [input] Press [Enter] to use the default value (yacceleratorfulfilmentprocess, yacceleratormarketplaceintegration, yacceleratorordermanagement, yacceleratorstorefront, yaddon, ybackoffice, ycommercewebservices, ycommercewebservicestest, ydocumentcart, [yempty], yhacext, yocc, yoccaddon, yocctests, ysapproductconfigaddon, ysmarteditmodule, yvoid, ywebservices)


2. select the Extension template should be from above list 

3.  Choose the name of your extension (Start with a letter followed by letters and/or numbers)

    Press [Enter] to use the default value [training]

4. Choose the package name for extension.

    Press [Enter] to use the default value [org.training]

5.   Add extension to /hybris/config/localextensions.xml
 	        <extension dir="/Hybrispayment"/>
           
 6.    Please remove all template extensions (again) before you proceed.
      	               
 7. Make sure the applicationserver is stopped before you build the extension the first time.

 8. Perform 'ant clean all' in your hybris/platform directory.

Modulegen is used to generate sets of dependent extensions-based accelerator templates. Following extensions are created storefront,facade, core, cockpits, fulfilmentprocess, initialdata, and test extensions prefixed with the given name. Modulegen available templates are accelerator, b2baccelerator, telcoaccelerator, and commercewebservices.

Generate the set of extensions using the Modulegen command

1. Go to hybris\bin\platform path in terminal and use ant modulegen.

2.  Choose a template for generation.
    [input] Press [Enter] to use the default value ([accelerator], acceleratorordermanagement, commercewebservices)

3. Choose the name for module extension (Start with a letter followed by letters and/or numbers).
       [input] Press [Enter] to use the default value [training]

4.  Choose the package name for extension.
          Press [Enter] to use the default value [org.training]

5.   Add extension to /hybris/config/localextensions.xml
 	        <extension dir="/HybrisDemocore"/>
                <extension dir="/HybrisDemobackoffice"/>
                <extension dir="/HybrisDemofacades"/>
                <extension dir="/HybrisDemofulfilmentprocess"/>
                <extension dir="/HybrisDemoinitialdata"/>
                <extension dir="/HybrisDemostorefront"/>
               <extension dir="/HybrisDemotest"/>

 6.   Remove the following extensions from /hybris/config/localextensions.xml
      	                yacceleratorcore,yacceleratorbackoffice,yacceleratorfacades,yacceleratorfulfilmentprocess,yacceleratorinitialdata,yacceleratorstorefront,yacceleratortest
     
 7. Make sure the applicationserver is stopped before you build the extension the first time.

 8. Perform 'ant clean all' in your hybris/platform directory.

Leave a Comment

Your email address will not be published. Required fields are marked *