Patch System

The Patch System supports Groovy Scripts and ACS AEM On-Deploy Scripts. You can use just one of these supported systems or use them combined.

Groovy Scripts

Patches in this tool are groovy scripts to fix content or other nodes. The Patch System allows you to put these groovy scripts in your VCS project.

The tool shows which patches were executed successfully, which have resulted in an error, and which patches are ready to be initiated.

With one click of a button, you can select all patches to be initiated.

The Patch System has a system to detect which patches were executed before and will not re-execute them again.

ACS AEM On-Deploy Scripts

On-Deploy Patches need to be created using the specifications of ACS AEM Commons.

The ACS AEM On-Deploy Scripts Executor takes care of executing them on OSGI bundle deploy. It keeps track of which patches were executed before and it will not re-execute them again.

This Patch System does not allow to trigger the On-Deploy Scripts (because ACS AEM Commons doesn't expose the Executor for external usage). It only allows to visualize them and show which scripts were executed successfully and which have resulted in an error.

Also available (since 1.2.1): Executing On-Deploy scripts, we contributed to ACS AEM Commons to enable this and is available in ACS Commons 4.3.0.

Biggest advantages

  • Automate patches when deploying
  • Re-run patches if needed
  • Check which patches caused errors
  • See which errors you need to solve
  • Groovy Patches are also managed as part of the codebase
  • Run scripts automatically on your local environment
  • View status of ACS AEM On-Deploy Scripts.

Ready to try this out?

Groovy mode

  1. Download and install ICF Olson Groovy Console: (We have a dependency to 13.0.0, other version might work as well, but is not tested)
  2. Install this repository in your AEM environment or download the zip file.
  3. Make sure you upload some Groovy Scripts to /apps/patches
  4. Go to http://localhost:4502/jetpack/patch-system.html

ACS On-Deploy Script mode

  1. Install ACS AEM Commons
  2. Follow the ACS AEM Commons On-Deploy Scripts instructions to set-up some On-Deploy Scripts.
  3. Deploy the On-Deploy Scripts to your AEM
  4. Go to http://localhost:4502/jetpack/patch-system.html

Want to learn more on how this works for Groovy Scripts?

Upload all patches to /apps/patches/[project]/[patch].groovy

  • /apps/patches is a sling:Folder (which is created by deploying this tool)
  • project is a nt:folder, sling:Folder or sling:OrderedFolder. A jcr:title can be added for a more readable name.
  • [patch].groovy is a valid groovy script

It's also possible to nest & group multiple project folders: /apps/patches/[project]/[child-project]/[patch].groovy

These groovy scripts can be part of your code project in VCS.

The Touch UI tool will allow you to see all groovy scripts, check their status, run 1 or multiple groovy scripts, run all new or modified scripts, ...

Want to learn more on how this works for ACS AEM On-Deploy Scripts?

No additional steps are required for ACS AEM On-Deploy Scripts (Make sure you have at least followed the instructions of ACS AEM Commons, which means creating an OSGI config to enable this tool.)

Remote API

The remote API could be used for CI purposes. Your CI system can use the following commands after deploying to make sure the patches are all executed:

Don't forget to set the content-type on the request to 'application/json'.


Find some examples for both groovy scripts on ACS AEM On-Deploy Scripts.

Good to know

This tool uses our own Jetpack Carve library to store Sling Models back into the repository.

The executed Groovy Patch status is stored in /var/patches/completed. ACS On-Deploy Scripts are stored in /var/acs-commons/on-deploy-scripts-status.