{"id":15056594,"url":"https://github.com/icfnext/aem-groovy-console","last_synced_at":"2025-05-16T06:05:47.412Z","repository":{"id":44454282,"uuid":"1800511","full_name":"icfnext/aem-groovy-console","owner":"icfnext","description":"The AEM Groovy Console provides an interface for running Groovy scripts in the AEM container. Scripts can be created to manipulate content in the JCR, call OSGi services, or execute arbitrary code using the CQ, Sling, or JCR APIs.","archived":false,"fork":false,"pushed_at":"2024-10-17T16:22:45.000Z","size":3344,"stargazers_count":160,"open_issues_count":15,"forks_count":94,"subscribers_count":60,"default_branch":"develop","last_synced_at":"2025-04-08T16:01:47.657Z","etag":null,"topics":["adobe-cq","aem","groovy","jcr","osgi","sling"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/icfnext.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-05-25T18:51:42.000Z","updated_at":"2025-03-17T21:28:07.000Z","dependencies_parsed_at":"2024-12-02T00:30:29.616Z","dependency_job_id":null,"html_url":"https://github.com/icfnext/aem-groovy-console","commit_stats":{"total_commits":636,"total_committers":28,"mean_commits":"22.714285714285715","dds":0.3427672955974843,"last_synced_commit":"9f22d7708d4174dd10717c3d1a742d4d0e76f116"},"previous_names":["citytechinc/cq-groovy-console"],"tags_count":50,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icfnext%2Faem-groovy-console","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icfnext%2Faem-groovy-console/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icfnext%2Faem-groovy-console/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icfnext%2Faem-groovy-console/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icfnext","download_url":"https://codeload.github.com/icfnext/aem-groovy-console/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254478188,"owners_count":22077676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adobe-cq","aem","groovy","jcr","osgi","sling"],"created_at":"2024-09-24T21:53:52.226Z","updated_at":"2025-05-16T06:05:47.393Z","avatar_url":"https://github.com/icfnext.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AEM Groovy Console\n\n_This project has moved to https://github.com/CID15/aem-groovy-console and will no longer be maintained in this repository._\n\n## Overview\n\nThe AEM Groovy Console provides an interface for running [Groovy](http://www.groovy-lang.org/) scripts in Adobe Experience Manager.  Scripts can be created to manipulate content in the JCR, call OSGi services, or execute arbitrary code using the AEM, Sling, or JCR APIs.  After ainstalling the package in AEM (instructions below), see the [console page](http://localhost:4502/apps/groovyconsole.html) for documentation on the available bindings and methods.  Sample scripts are included in the package for reference.\n\n![Screenshot](src/site/screenshot.png)\n\n## Requirements\n\n* AEM author instance running on [localhost:4502](http://localhost:4502/)\n* [Maven](http://maven.apache.org/) 3.x\n\n## Compatibility\n\nGroovy Console Version(s) | AEM Version(s)\n------------ | -------------\n15.x.x, 14.x.x, 13.x.x | 6.3, 6.4, 6.5\n12.x.x | 6.4\n11.x.x | 6.3\n10.x.x, 9.x.x | 6.2\n8.x.x | 6.1\n7.x.x | 6.0\n6.x.x, 5.x.x | 5.6 (CQ)\n3.x.x | 5.5, 5.4 (CQ)\n\n## Installation\n\n1. [Download the console package](https://github.com/icfnext/aem-groovy-console/releases/download/14.0.0/aem-groovy-console-14.0.0.zip).  For previous versions, tags can be checked out from GitHub and built directly from the source (e.g. `mvn install`).\n\n2. [Verify](http://localhost:4502/apps/groovyconsole.html) the installation.\n\nAdditional build profiles may be added in the project's `pom.xml` to support deployment to non-localhost AEM servers.\n\nTo enable access to the Groovy Console from `/groovyconsole`, update the **Groovy Console Configuration Service** via the [OSGi console configuration page](http://localhost:4502/system/console/configMgr) to enable the vanity path.\n\n## Building From Source\n\nTo build and install the latest development version of the Groovy Console (or if you've made source modifications), run the following Maven command.\n\n    mvn install -P local\n\n## Excluding the Groovy OSGi Bundle\n\nIf your AEM instance has multiple applications using Groovy and the `groovy-all` bundle is already deployed, you can exclude this bundle from the Groovy Console package build with the `exclude-groovy-bundle` Maven profile.  This should prevent issues with conflicting Groovy versions at runtime.\n\n    mvn install -P local,exclude-groovy-bundle\n\n## Context Path Support\n\nIf you are running AEM with a context path, set the Maven property `aem.context.path` during installation.\n\n    mvn install -P local -Daem.context.path=/context\n\n## OSGi Configuration\n\nNavigate to the [OSGi console configuration page](http://localhost:4502/system/console/configMgr) and select the **Groovy Console Configuration Service**.\n\nProperty | Description | Default Value\n------------ | ------------- | ----------\nEmail Enabled? | Check to enable email notification on completion of script execution. | `false`\nEmail Recipients | Email addresses to receive notification. | `[]`\nScript Execution Allowed Groups | List of group names that are authorized to use the console.  By default, only the 'admin' user has permission to execute scripts. | `[]`\nScheduled Jobs Allowed Groups | List of group names that are authorized to schedule jobs.  By default, only the 'admin' user has permission to schedule jobs. | `[]`\nVanity Path Enabled? | Enables `/groovyconsole` vanity path. | `false`\nAudit Disabled? | Disables auditing of script execution history. | `false`\nDisplay All Audit Records? | If enabled, all audit records (including records for other users) will be displayed in the console history. | `false`\nThread Timeout | Time in seconds that scripts are allowed to execute before being interrupted.  If 0, no timeout is enforced. | 0 \n\n## Batch Script Execution\n\nSaved scripts can be remotely executed by sending a POST request to the console servlet with either the `scriptPath` or `scriptPaths` query parameter.\n\n### Single Script\n\n    curl -d \"scriptPath=/var/groovyconsole/scripts/samples/JcrSearch.groovy\" -X POST -u admin:admin http://localhost:4502/bin/groovyconsole/post.json\n\n### Multiple Scripts\n\n    curl -d \"scriptPaths=/var/groovyconsole/scripts/samples/JcrSearch.groovy\u0026scriptPaths=/var/groovyconsole/scripts/samples/FulltextQuery.groovy\" -X POST -u admin:admin http://localhost:4502/bin/groovyconsole/post.json\n\n## Extensions\n\nThe Groovy Console provides extension hooks to further customize script execution.  The console provides an API containing extension provider interfaces that can be implemented as OSGi services in any bundle deployed to an AEM instance.  See the default extension providers in the `com.icfolson.aem.groovy.console.extension.impl` package for examples of how a bundle can implement these services to supply additional script bindings, compilation customizers, metaclasses, and star imports.\n\nService Interface | Description\n------------ | -------------\n`com.icfolson.aem.groovy.console.api.BindingExtensionProvider` | Customize the bindings that are provided for each script execution.\n`com.icfolson.aem.groovy.console.api.CompilationCustomizerExtensionProvider` | Restrict language features (via blacklist or whitelist) or provide AST transformations within the Groovy script compilation.\n`com.icfolson.aem.groovy.console.api.ScriptMetaClassExtensionProvider` | Add runtime metaclasses (i.e. new methods) to the underlying script class.\n`com.icfolson.aem.groovy.console.api.StarImportExtensionProvider` | Supply additional star imports that are added to the compiler configuration for each script execution.\n\n## Notifications\n\nTo provide custom notifications for script executions, bundles may implement the `com.icfolson.aem.groovy.console.notification.NotificationService` interface (see the `com.icfolson.aem.groovy.console.notification.impl.EmailNotificationService` class for an example).  These services will be dynamically bound by the Groovy Console service and all registered notification services will be called for each script execution.\n\n## Scheduler\n\nThe Scheduler allows for immediate (asynchronous) or Cron-based script execution.  Scripts are executed as [Sling Jobs](https://sling.apache.org/documentation/bundles/apache-sling-eventing-and-job-handling.html) and are audited in the same manner as scripts executed in the console.\n\n### Scheduled Job Event Handling\n\nBundles may implement services extending `com.icfolson.aem.groovy.console.job.event.AbstractGroovyConsoleScheduledJobEventHandler` to provide additional post-processing or notifications for completed Groovy Console jobs.  See `com.icfolson.aem.groovy.console.job.event.DefaultGroovyConsoleEmailNotificationEventHandler` for an example of the required annotations to register a custom event handler.\n\n## Sample Scripts\n\nSample scripts can be found in the `src/main/scripts` directory.\n\n## Versioning\n\nFollows [Semantic Versioning](http://semver.org/) guidelines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficfnext%2Faem-groovy-console","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficfnext%2Faem-groovy-console","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficfnext%2Faem-groovy-console/lists"}