Files customization in SAP Hybris (Add dependency to platform + Customize

Hybris Logo

SAP Hybris solution is thinking always about you, and offer the ability for his clients to customize their OOTB resources.

So which problems can be solved by using this option ?

Basically the OOTB customization become a necessary task when the OOTB should be adjusted to serve the technical needs like :

  • Override the platform external dependencies file to add a new library (Exemple 1)
  • Add a custom script (Exemple 2)

1. Idea

Their is a customize folder in the config folder generated when we run ant all at the first time, and this one is used specially to replace native SAP Hybris resources by adding custom resources in the customize folder with the same path, which means if you want to customize a file like HYBRIS_DIR/bin/platform/build.xml you need to add your custom build.xml in the following folder HYBRIS_DIR/config/customize/platform/ and then run ant customize before ant all.

2. Implementation

2.1. Example 1 :

To add new database external dependency properly in the platform extension, we need to replace platform HYBRIS_DIR/bin/platform/lib/dbdriver/external-dependencies.xml by a new one where the database dependency should be added to the dependencies tag.

Steps :

1 – Copy HYBRIS_DIR/bin/platform/lib/dbdriver/external-dependencies.xml in HYBRIS_DIR/config/customize/platform/lib/dbdriver/external-dependencies.xml

2 – Add the new dependency to HYBRIS_DIR/config/customize/platform/lib/dbdriver/external-dependencies.xml file

Should look like that :

<project xmlns="" xmlns:xsi=""
        <!--MySQL dependency-->

3 – Run customize target

/hybris/bin/platform$ ant customize

2.2. Example 2 :

It’s helpful trick special for developer who has many ENV variables need to be declared with, it could be also a why to add more memory to your ANT_OPTS variable, so to do you need to follow these steps :

1 – Create new file called

/config/customize$ vim ./platform/

2 – Add following content on this file :


. ./ 

export ANT_OPTS="-Xmx4g -Dfile.encoding=UTF-8 -Djdk.util.jar.enableMultiRelease=force"

3 – Run customize target

/hybris/bin/platform$ ant customize

4 – Use instead of

/hybris/bin/platform$ . ./
0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x