Skip to content

Commit

Permalink
Merge branch 'release/9.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
markdaugherty committed Jul 27, 2016
2 parents e3874bc + 70d528e commit e39fcd4
Show file tree
Hide file tree
Showing 49 changed files with 664 additions and 625 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2013 CITYTECH, Inc.
Copyright 2016 ICF Olson

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AEM Groovy Console

[CITYTECH, Inc.](http://www.citytechinc.com)
[ICF Olson](http://www.icfolson.com)

## Overview

Expand Down Expand Up @@ -34,11 +34,11 @@ If you are running AEM with a context path, set the Maven property `aem.context.

## Extensions

Starting in version 7.0.0, the Groovy Console provides extension hooks to further customize script execution. The console exposes an API containing three 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.citytechinc.aem.groovy.console.extension.impl` package for examples of how a bundle can implement these services to supply additional script bindings, metaclasses, and star imports.
Starting in version 7.0.0, the Groovy Console provides extension hooks to further customize script execution. The console exposes an API containing three 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, metaclasses, and star imports.

### Notifications

To provide custom notifications for script executions, bundles may implement the `com.citytechinc.aem.groovy.console.notification.NotificationService` interface (see the `com.citytechinc.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.
To provide custom notifications for script executions, bundles may implement the `com.icfolson.aem.groovy.console.notification.NotificationService` interface (see the `com.citytechinc.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.

## Notes

Expand Down
73 changes: 38 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>com.citytechinc.aem</groupId>
<groupId>com.icfolson.aem</groupId>
<artifactId>parent</artifactId>
<version>6.1.1</version>
<version>6.2.1</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>com.citytechinc.aem.groovy.console</groupId>
<groupId>com.icfolson.aem.groovy.console</groupId>
<artifactId>aem-groovy-console</artifactId>
<packaging>jar</packaging>
<version>8.0.1</version>
<version>9.0.0</version>
<name>AEM Groovy Console</name>
<description>
The AEM Groovy Console provides an interface for running Groovy scripts in the AEM (Adobe CQ) container. Scripts
Expand All @@ -20,8 +20,8 @@
</description>

<organization>
<name>CITYTECH, Inc.</name>
<url>http://www.citytechinc.com</url>
<name>ICF Olson</name>
<url>http://www.icfolson.com</url>
</organization>

<licenses>
Expand Down Expand Up @@ -70,8 +70,9 @@
<timestamp>${maven.build.timestamp}</timestamp>
<aem.package.goal>install</aem.package.goal>
<aem.username>admin</aem.username>
<aem.context.path />
<aem.context.path/>
<osgi.bundle.status.skip.publish>true</osgi.bundle.status.skip.publish>
<assembly.descriptor.name>zip.xml</assembly.descriptor.name>
</properties>

<profiles>
Expand All @@ -85,6 +86,17 @@
<osgi.bundle.status.skip>true</osgi.bundle.status.skip>
</properties>
</profile>
<profile>
<id>exclude-groovy-bundle</id>
<activation>
<property>
<name>exclude-groovy-bundle</name>
</property>
</activation>
<properties>
<assembly.descriptor.name>zip-exclude-groovy-bundle.xml</assembly.descriptor.name>
</properties>
</profile>
<profile>
<id>local</id>
<activation>
Expand Down Expand Up @@ -131,11 +143,11 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<version>3.5</version>
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
<source>1.7</source>
<target>1.7</target>
<source>1.8</source>
<target>1.8</target>
<encoding>utf-8</encoding>
</configuration>
<dependencies>
Expand All @@ -153,7 +165,7 @@
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<version>2.19.1</version>
<configuration>
<includes>
<include>**/*Spec*</include>
Expand All @@ -179,7 +191,7 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.3</version>
<version>3.0.1</version>
<extensions>true</extensions>
<executions>
<execution>
Expand All @@ -193,7 +205,7 @@
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-Vendor>${project.organization.name}</Bundle-Vendor>
<Export-Package>!*.impl,com.citytechinc.aem.groovy.console.*</Export-Package>
<Export-Package>!*.impl,com.icfolson.aem.groovy.console.*</Export-Package>
<DynamicImport-Package>*</DynamicImport-Package>
</instructions>
</configuration>
Expand All @@ -211,7 +223,7 @@
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/zip.xml</descriptor>
<descriptor>src/main/assembly/${assembly.descriptor.name}</descriptor>
</descriptors>
</configuration>
</execution>
Expand Down Expand Up @@ -352,10 +364,6 @@
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr</artifactId>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.api</artifactId>
Expand All @@ -365,7 +373,7 @@
<artifactId>org.apache.sling.jcr.api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<groupId>com.adobe.granite.sling</groupId>
<artifactId>org.apache.sling.jcr.resource</artifactId>
</dependency>
<dependency>
Expand All @@ -392,14 +400,9 @@
<groupId>com.day.cq</groupId>
<artifactId>cq-mailer</artifactId>
</dependency>
<dependency>
<groupId>com.day.cq</groupId>
<artifactId>cq-tagging</artifactId>
</dependency>
<dependency>
<groupId>com.day.cq.wcm</groupId>
<artifactId>cq-wcm-taglib</artifactId>
<version>[5.7.4,5.8.2]</version>
</dependency>
<dependency>
<groupId>com.adobe.granite</groupId>
Expand All @@ -414,13 +417,13 @@
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId>
<groupId>com.day.commons.osgi.wrapper</groupId>
<artifactId>com.day.commons.osgi.wrapper.commons-email</artifactId>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-api</artifactId>
</dependency>

<!-- compile -->
<dependency>
Expand All @@ -433,21 +436,21 @@
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.3</version>
<version>2.4.7</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.citytechinc.aem.groovy.extension</groupId>
<groupId>com.icfolson.aem.groovy.extension</groupId>
<artifactId>aem-groovy-extension-bundle</artifactId>
<version>1.0.1</version>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>

<!-- test -->
<dependency>
<groupId>com.citytechinc.aem.prosper</groupId>
<groupId>com.icfolson.aem.prosper</groupId>
<artifactId>prosper</artifactId>
<version>5.0.0</version>
<version>8.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
42 changes: 42 additions & 0 deletions src/main/assembly/zip-exclude-groovy-bundle.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version='1.0' encoding='UTF-8'?>
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>zip</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>${basedir}/src/main/content/jcr_root</directory>
<excludes>
<exclude>**/.DS_Store</exclude>
</excludes>
<outputDirectory>jcr_root</outputDirectory>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/scripts</directory>
<outputDirectory>jcr_root/etc/groovyconsole/scripts/samples</outputDirectory>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/content/META-INF</directory>
<outputDirectory>META-INF</outputDirectory>
<filtered>true</filtered>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>jcr_root/apps/groovyconsole/install</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<useStrictFiltering>true</useStrictFiltering>
<scope>provided</scope>
<unpack>false</unpack>
<includes>
<include>com.icfolson.aem.groovy.console:aem-groovy-console</include>
<include>com.icfolson.aem.groovy.extension:aem-groovy-extension-bundle</include>
</includes>
</dependencySet>
</dependencySets>
</assembly>
4 changes: 2 additions & 2 deletions src/main/assembly/zip.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<scope>provided</scope>
<unpack>false</unpack>
<includes>
<include>com.citytechinc.aem.groovy.console:aem-groovy-console</include>
<include>com.citytechinc.aem.groovy.extension:aem-groovy-extension-bundle</include>
<include>com.icfolson.aem.groovy.console:aem-groovy-console</include>
<include>com.icfolson.aem.groovy.extension:aem-groovy-extension-bundle</include>
<include>org.codehaus.groovy:groovy-all</include>
</includes>
</dependencySet>
Expand Down
6 changes: 3 additions & 3 deletions src/main/content/META-INF/vault/properties.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
<properties>
<comment>FileVault Package Properties</comment>
<entry key="createdBy">${cq.username}</entry>
<entry key="createdBy">${aem.username}</entry>
<entry key="name">${project.artifactId}</entry>
<entry key="description">${project.description}</entry>
<entry key="lastModified">${timestamp}</entry>
<entry key="lastModifiedBy">${cq.username}</entry>
<entry key="lastModifiedBy">${aem.username}</entry>
<entry key="created">${timestamp}</entry>
<entry key="buildCount">1</entry>
<entry key="version">${project.version}</entry>
Expand All @@ -15,5 +15,5 @@
<entry key="group" />
<entry key="packageFormatVersion">2</entry>
<entry key="lastWrapped">${timestamp}</entry>
<entry key="lastWrappedBy">${cq.username}</entry>
<entry key="lastWrappedBy">${aem.username}</entry>
</properties>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<li>Inspired by Guillaume Laforge's <a href="http://groovyconsole.appspot.com" target="_blank">Groovy Web Console</a>.</li>
<li>Implemented with <a href="http://groovy.codehaus.org" target="_blank">Groovy</a> version <%= groovy.lang.GroovySystem.getVersion() %> and <a href="http://getbootstrap.com/" target="_blank">Bootstrap</a>.</li>
<li>Code editing capabilities provided by <a href="http://ace.c9.io/" target="_blank">Ace</a>.</li>
<li>Project hosted on <a href="https://github.com/Citytechinc/cq-groovy-console" target="_blank">GitHub</a> for <a href="http://www.citytechinc.com" target="_blank">CITYTECH, Inc.</a></li>
<li>Project hosted on <a href="https://github.com/Citytechinc/cq-groovy-console" target="_blank">GitHub</a> for <a href="http://www.icfolson.com" target="_blank">ICF Olson</a></li>
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<div class="panel-body">
<p>Additional packages imported into all scripts.</p>
<ul>
<li><a href="http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/search/package-summary.html" target="_blank">com.day.cq.search</a></li>
<li><a href="http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/tagging/package-summary.html" target="_blank">com.day.cq.tagging</a></li>
<li><a href="http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/wcm/api/package-summary.html" target="_blank">com.day.cq.wcm.api</a></li>
<li><a href="http://dev.day.com/docs/en/cq/current/javadoc/com/day/cq/replication/package-summary.html" target="_blank">com.day.cq.replication</a></li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/ref/javadoc/com/day/cq/search/package-summary.html" target="_blank">com.day.cq.search</a></li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/ref/javadoc/com/day/cq/tagging/package-summary.html" target="_blank">com.day.cq.tagging</a></li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/ref/javadoc/com/day/cq/wcm/api/package-summary.html" target="_blank">com.day.cq.wcm.api</a></li>
<li><a href="https://docs.adobe.com/docs/en/aem/6-1/ref/javadoc/com/day/cq/replication/package-summary.html" target="_blank">com.day.cq.replication</a></li>
<li><a href="http://www.day.com/maven/jsr170/javadocs/jcr-2.0/javax/jcr/package-summary.html" target="_blank">javax.jcr</a></li>
<li><a href="http://sling.apache.org/apidocs/sling5/org/apache/sling/api/package-summary.html" target="_blank">org.apache.sling.api</a></li>
<li><a href="http://sling.apache.org/apidocs/sling5/org/apache/sling/api/resource/package-summary.html" target="_blank">org.apache.sling.api.resource</a></li>
<li><a href="http://sling.apache.org/apidocs/sling7/org/apache/sling/api/package-summary.html" target="_blank">org.apache.sling.api</a></li>
<li><a href="http://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/package-summary.html" target="_blank">org.apache.sling.api.resource</a></li>
</ul>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<%@include file="/libs/foundation/global.jsp"%>
<%@taglib prefix="groovyConsole" uri="http://www.citytechinc.com/taglibs/groovyconsole"%>
<%@taglib prefix="groovyConsole" uri="http://www.icfolson.com/taglibs/groovyconsole"%>

<groovyConsole:defineObjects />
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@ td.open-record, td.delete-record {

#result-table table {
background-color: #f5f5f5;
}

.popover {
max-width: 100%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ GroovyConsole.Audit = function () {
rowCallback: function (row, data) {
$('td:eq(1)', row).html('<a href="' + data.link + '">' + data.date + '</a>');
$('td:eq(2)', row).html('<code>' + data.scriptPreview + '</code>');
$('td:eq(2)', row).popover({
container: 'body',
content: '<pre>' + data.script + '</pre>',
html: true,
placement: 'top',
trigger: 'hover'
});

if (data.exception.length) {
$('td:eq(3)', row).html('<span class="label label-danger">' + data.exception + '</span>');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ var GroovyConsole = function () {

hasTable = true;
} catch (e) {
console.log('unable to parse JSON for table = ' + e.message);

}

return hasTable;
Expand Down Expand Up @@ -280,7 +280,7 @@ var GroovyConsole = function () {
loadScript: function (scriptPath) {
GroovyConsole.reset();

$.get(CQ.shared.HTTP.getContextPath() + '/crx/server/crx.default/jcr%3aroot' + scriptPath + '/jcr%3Acontent/jcr:data').done(function (script) {
$.get(CQ.shared.HTTP.getContextPath() + scriptPath + '/jcr:content/jcr:data').done(function (script) {
GroovyConsole.localStorage.saveScriptName(scriptPath);
GroovyConsole.showSuccess('Script loaded successfully.');

Expand Down

This file was deleted.

Loading

0 comments on commit e39fcd4

Please sign in to comment.