Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

AEM: Import and re-use Groovy snippets in your scripts and customize the console | AEM Community Blog Seeding

kautuk_sahni
Community Manager
Community Manager

BlogImage.jpg

AEM: Import and re-use Groovy snippets in your scripts and customize the console by Theo Pendle

Abstract

The AEM Groovy console is a great open-source tool for AEM administrators. It allows you to write Groovy scripts that can be executed on a live AEM instance to run against the JCR. You need to add an alt property to all images of your site? No problem. Need to find references to a particular piece of content? Easy! The console lets you write the script directly in AEM, save it and run it, without ever having to recompile or redeploy any code.

If you aren’t already aware of the AEM Groovy console, there are a number of articles to help you understand its benefits, but the best place to look if you want to try it out is the public Github repo which features some example scripts.

One thing that isn’t mentioned there but that becomes very useful when you start using and re-using your scripts is how to import code from one script into another. This will help you avoid writing 500-line scripts or copy-pasting simple utility functions in several scripts.

Read Full Blog

AEM: Import and re-use Groovy snippets in your scripts and customize the console

Q&A

Please use this thread to ask the related questions.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

0 Replies