2
votes

I have these extensions in "extensioninfo.xml":

<extension dir="${HYBRIS_BIN_DIR}/ext-commerce/b2bapprovalprocess"/>
<extension dir="${HYBRIS_BIN_DIR}/ext-commerce/b2bcommerce"/>
<extension dir="${HYBRIS_BIN_DIR}/ext-template/b2bstore"/>
<extension dir="${HYBRIS_BIN_DIR}/ext-commerce/basecommerce"/>
<extension dir="${HYBRIS_BIN_DIR}/ext-content/bmecat"/>

How are these extensions built? Is there any order if I have them in the same "extensioninfo.xml" file? Will "b2bapprovalprocess" be built before "b2bcommerce", "b2bcommerce" before "b2bstore" and so on... ?

1

1 Answers

2
votes

The order is defined by dependencies of extensions using requires-extension in extensions' extensioninfo.xml.

If C requires-extension B, and B requires-extension A, then the order is A, B, C.

If C requires-extension A, and B requires-extension A, then the order can be A, B, C or A, C, B. i.e. If 2 or more extensions are on the same level, then the order may be random at that level.

In the example code below from acceleratorcms extension, we can be sure that cms2lib or acceleratorservices will be processed first before acceleratorcms. However, we cannot be sure which one will be first: cms2lib or acceleratorservices.

<extensioninfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="extensioninfo.xsd">
    <extension abstractclassprefix="Generated" classprefix="AcceleratorCms" managername="AcceleratorCmsManager" managersuperclass="de.hybris.platform.jalo.extension.Extension" name="acceleratorcms">              
        <requires-extension name="cms2lib"/>                
        <requires-extension name="acceleratorservices"/>                
        <coremodule generated="true" manager="de.hybris.platform.acceleratorcms.jalo.AcceleratorCmsManager" packageroot="de.hybris.platform.acceleratorcms"/>            
    </extension>
</extensioninfo>