beta.blog

hybris: Platform Compilation Modes

by on Jan.23, 2019, under News

By default, SAP Commerce (hybris / Customer Experience) comes with two different compilation modes. The modes control the scope declared dependencies are provided.

  • Strict compilation mode:
    All extensions are compiled using only their declared dependencies
  • Relaxed compilation mode:
    One large platform-wide classpath is used during the compilation process

In previous versions of hybris the relaxed mode was in place. However, this lead to dependency issues i.e. when multiple, incompatible, versions of a library version were used.

Nowadays we may switch between strict and relaxed mode by setting the following property:

build.strict.compilation.mode=true

During the build process hybris will print an according message informing us about the build mode in use:

[echo] —————————————————————
[echo] hybris Platform Environment
[echo] —————————————————————
[echo] OS family:                 unix
[echo] Java platform:             Java(TM) SE Runtime Environment, 1.8.0_144-b01
[echo] Java compiler:             org.eclipse.jdt.core.JDTCompilerAdapter
[echo] Build target:              1.8
[echo] Compilation mode:          relaxed
[echo] hybris Platform directory: /hybris/bin/platform
[echo] hybris Platform version:   1811.1
[echo] Ant version:               Apache Ant(TM) version 1.10.5 compiled on July 10 2018
[echo] Ant memory settings:       ${env.ANT_OPTS}

:,

Leave a Reply

*

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!