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.

Cortex Web Application POMs

The Cortex webapp POM (at extensions/cortex/ext-cortex-webapp/pom.xml) controls all of the bundles that are loaded by OSGi at runtime. Adding new Cortex resources or third-party dependencies to Cortex usually requires making modifications to this file.

Common POM Use Cases

  • Adding New Resources
    Update your webapp POM with the new resource.
     
  • Adding Libraries to the Web Application POMs
    When adding new libraries to your webapp, update your webapp POM with the new library. For more information, see Adding third party jars to Cortex API.
     
  • Disabling Resource Bundles
    Resource bundles can be disabled by removing their dependencies from the webapp POM.
     

Bundle Packaging and Load ordering

File structure:

    /
    -META-INF/
    -WEB-INF/
    --lib/
    --bundles1/
    --bundles2/
    --bundles3/
    --bundles4/
    --bundles/

The contents of the directories has been omitted. Below is a description of these directories.

  • lib
    Standard webapp directory for 3rd party libraries required by your application, these might include libraries that are not osgi ready and need to be provided by the osgi environment.
     
  • bundles1
    The first directory the osgi framework will load. (Default empty)
     
  • bundles2
    The second directory the osgi framework will load. (Default contains system and runtime bundles)
     
  • bundles3
    The third directory the osgi framework will load. (Default empty)
     
  • bundles4
    The fourth directory the osgi framework will load. (Default conains all of the api resources, apis and integrations)
     
  • bundles1
    The last directory the osgi framework will load. (Default empty)
     

The bundles that load into each directory are configurable from the webapp pom. You may use the empty directories as you see fit.

Note

When selecting a directory to use, note that after loading all bundles from the directory the OSGi framework attempts to start them. If the dependencies of a bundle are in the current or previous directories, a start error for the bundle is returned.