Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Build-time property configuration

Build-time property configuration

Build-time Spring configuration is performed in At run-time, Spring resolves the placeholders in the Spring XML configuration files against the values in

The following line in service.xml is responsible for looking up property values in
<context:property-placeholder location="" />

Only one <context:property-placeholder> is allowed for all Spring XML configuration files.

Setting values in non-Spring configuration files

You may need to set property values in your project's non-Spring configuration files, such as or security.xml. You can set those values at build time by changing the values in the appropriate configuration file located in the misc or security directory in <WAR Extension Project root>\src\main\webapp\WEB-INF.

If you are adding a new non-spring configuration file, do the following:

  1. Create the new configuration file and place it in <WAR Extension Project root>\src\main\webapp\WEB-INF
  2. Open the extension project's pom.xml
  3. Under all <maven-war-plugin> tags, add a new <resource> in the <webResources> element. For example, to add a security.xml at build-time, the <resource> would look similar to the following:
    • <directory> is the directory in your extension project that contains the configuration file(s) to be copied at build-time.
    • <filtering> specifies whether to replace property value placeholders in the configuration file(s) with values in
    • <targetPath> is the directory relative to the WAR root where the configuration file(s) will be copied during the build.
    • <includes> or <excludes> can be used to filter which files are copied. If neither are present, all files in the source directory are copied.