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.
Cortex Web Application POMs
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.