AEM Run modes

Installation run modes are provided out-of-the-box:

These are pairs can't be used together like author cannot be used with publish and samplecontent cannot be used with nosamplecontent

author

publish

Samplecontent

nosamplecontent

Customized Run Modes

  • author + development

  • publish + test

  • publish + test + golive

  • publish + intranet

  • as required . . .

Defining configuration properties for a run mode

  • config Applicable for all run modes

  • config.author Used for author run mode

  • config.publish Used for publish run mode

  • config.<run-mode> Used for the applicable run mode; for example, config

For installing bundles in specific runmodes

  • install.author

  • install.publish

These folders are of type nt:folder and should contain the appropriate bundle.

Methods for specifying which run mode

  1. sling.properties file

The sling.properties file can be used to define the required run mode:

  • Edit the configuration file:

<cq-installation-dir>/crx-quickstart/conf/sling.properties

  • Add the following properties; e.g. author:

sling.run.modes=author

  1. -r option

A custom run mode can be activated by using the -r option using command line in startup. e.g. for custom dev run mode >>java -jar cq-56-p4545.jar -r dev

  1. system properties (-D)

A system property in the start script can be used to specify the run modes

e.g. launch an instance as a production publish instance located in the US:

-Dsling.run.modes=publish,prod,us

  1. Filename detection

The following two installation run modes can be activated by renaming the installation jar file before installation:

  • publish

  • Author

Defining the run mode in web.xml (with Application Server)

In Application server sling.run.modes in the file: WEB-INF/web.xml

This is in the AEM war file and should be updated before deployment.


53 views0 comments

Recent Posts

See All

More about clientlibs in AEM

Here we will talk more details about clientlibs Static Resources in clientlibs Static resources below the client library folder must be in a folder called resources. If you do not have the static reso

Debugging Clientlibs

In this article we will discuss about how we can debug the js and css file in development environment. Let's see what are the debugging tools available in AEM. To see the embedded files in clientlibs