Deployment of External WAR files in SAP Hybris

extensioninfo.xml.

Extensions in Hybris are like projects in Java. Each extension has functionality, it’s own data model, spring configurations, properties and etc. Each extension should have a file called extensioninfo.xml where we can find all the information about the extension like extension name, extension module(Core, Web or HMC) and dependencies on other extension.

<extensioninfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="extensioninfo.xsd">   <extension abstractclassprefix="Generated" classprefix="<CUSTOM>Facades" name="<CUSTOM>facades">      <!-- you should add all required extensions to this list, except platform
extensions which are automatically required -->

<requires-extension name="acceleratorfacades" />
<requires-extension name="<CUSTOM>ore" />
<requires-extension name="<CUSTOM>crmintegration" />
<requires-extension name="<CUSTOM>erpintegration" />
<requires-extension name="sapordermgmtb2bfacades" />
<requires-extension name="commercefacades" />
<coremodule generated="true" manager="de.hybris.platform.jalo.extension.GenericManager"
packageroot="com.<CUSTOM>.facades" />
</extension></extensioninfo>

localextension.xml

Each active extension of our Hybris project must find place in localextension.xml. It contains all of extensions which our configuration include in compile- and run-time.

<hybrisconfig xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation='../bin/platform/resources/schemas/extensions.xsd'>
<extensions>
<extension name='mcc' />
<extension name='commercesearchbackoffice' />
<extension name='b2bcommercebackoffice' />
<extension name='couponbackoffice' />
<extension name='droolsruleengineservices' />
<extension name='couponfacades' />
<extension name='promotionenginesamplesaddon' />
<extension name='accountsummaryaddon' />
<extension name='secureportaladdon' />
<extensions>
</hybrisconfig>

Deployment of External war files

To deploy external war files we need to add webapp element to localextensions.xml.

<extensions>

<extension .../>
<webapp contextroot="webchat" path="${HYBRIS_CONFIG_DIR}/path/webchat.war"/>
</extensions>
<extensions>

<extension .../>
<webapp context="/path/context.xml" /> </extensions> </extensions>
<Context path="/webchat" docBase="/path/webchat.war" />

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store