Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- **BREAKING:** Upgrade Groovy from 4.0.31 to 5.0.6
- **BREAKING:** Drop Java 8 support — minimum is now Java 11 (Groovy 5.x requires JDK 11+)
- Bump exported API package versions to 20.0.0

## [19.1.0] - 2026-05-04

### Changed
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ in the package for reference.

## Compatibility

AEM Groovy Console 19.0.8+ runs on Java 8, 11, 17 & 21 with an embedded Groovy version of 4.0.22
AEM Groovy Console 20.x requires **Java 11, 17 or 21** with an embedded Groovy version of 5.0.6.

For environments still on Java 8, use AEM Groovy Console 19.x (last release on the Groovy 4.x line).

Supported versions:

Expand Down
2 changes: 1 addition & 1 deletion all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
</parent>

<artifactId>aem-groovy-console-all</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
</parent>

<artifactId>aem-groovy-console-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.api.context.impl;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.api.context;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.api;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.1.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.audit;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.configuration;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.1")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.constants;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.extension;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.notification;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.response.impl;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.response;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.table;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.utils;
2 changes: 1 addition & 1 deletion bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
</parent>

<artifactId>aem-groovy-console-bundle</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@org.osgi.annotation.bundle.Export
@org.osgi.annotation.versioning.Version("19.0.0")
@org.osgi.annotation.versioning.Version("20.0.0")
package be.orbinson.aem.groovy.console.components;
2 changes: 1 addition & 1 deletion groovy/groovy-osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion groovy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
</parent>

<packaging>pom</packaging>
Expand Down
7 changes: 6 additions & 1 deletion it.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
</parent>

<artifactId>aem-groovy-console-it-tests</artifactId>
Expand Down Expand Up @@ -86,6 +86,11 @@
<version>14</version>
</includeArtifact>
<filesInclude>*.json</filesInclude>
<!-- WORKAROUND: Starter 14 ships jetty12 1.1.8; jetty12.json pins 1.2.0,
take the highest. Remove once we move to Sling Starter 15. -->
<artifactsOverrides>
<artifactsOverride>org.apache.felix:org.apache.felix.http.jetty12:HIGHEST</artifactsOverride>
</artifactsOverrides>
</aggregate>
</aggregates>
<replacePropertyVariables>project.version</replacePropertyVariables>
Expand Down
11 changes: 11 additions & 0 deletions it.tests/src/main/features/jetty12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// WORKAROUND: Sling Starter 14 ships org.apache.felix.http.jetty12 1.1.8, which
// intermittently fails IT startup. Pin 1.2.0 here (the aggregate's artifactsOverrides
// takes HIGHEST). Remove this file and the override once we move to Sling Starter 15.
"bundles": [
{
"id": "org.apache.felix:org.apache.felix.http.jetty12:1.2.0",
"start-order": "5"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;

import static org.awaitility.Awaitility.await;
import static org.junit.jupiter.api.Assertions.*;

class GroovyConsoleServiceIT {
Expand All @@ -36,11 +34,60 @@
@BeforeAll
static void setUp() {
httpClient = HttpClients.createDefault();
waitForStableReadiness(300, 15);
}

// Wait for the Sling Starter and the Groovy Console content package to be fully installed
await().atMost(120, TimeUnit.SECONDS)
.pollInterval(5, TimeUnit.SECONDS)
.untilAsserted(() -> assertTrue(isHealthy(), "System not healthy"));
/**
* Polls the Groovy Console servlet with a no-op script until it has returned 200 OK for a
* continuous window. This guards against the Sling Starter package-install refresh cascade
* that briefly tears down our bundle: a single OK isn't enough — we need stability before
* the test cases start firing requests.
*/
private static void waitForStableReadiness(long overallTimeoutSec, long stabilityWindowSec) {
long deadline = System.currentTimeMillis() + overallTimeoutSec * 1000;
long stableSince = -1;
while (System.currentTimeMillis() < deadline) {
boolean ready = isGroovyConsoleReady();
long now = System.currentTimeMillis();
if (ready) {
if (stableSince < 0) {
stableSince = now;
} else if (now - stableSince >= stabilityWindowSec * 1000) {
return;
}
} else {
stableSince = -1;
}
try {
Thread.sleep(1000);

Check warning on line 62 in it.tests/src/test/java/be/orbinson/aem/groovy/console/it/GroovyConsoleServiceIT.java

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this use of "Thread.sleep()".

See more on https://sonarcloud.io/project/issues?id=orbinson_aem-groovy-console&issues=AZ69VgzNoDBGmgFv6G95&open=AZ69VgzNoDBGmgFv6G95&pullRequest=79
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
fail("Interrupted while waiting for Groovy Console readiness");
}
}
fail("Groovy Console did not become stable within " + overallTimeoutSec
+ "s (need " + stabilityWindowSec + "s of continuous OK)");
}

private static boolean isGroovyConsoleReady() {
try (CloseableHttpClient client = HttpClients.createDefault()) {
HttpPost post = new HttpPost(BASE_URL + "/bin/groovyconsole/post");
List<BasicNameValuePair> params = new ArrayList<>();
params.add(new BasicNameValuePair("script", "return 'ready'"));
post.setEntity(new UrlEncodedFormEntity(params, StandardCharsets.UTF_8));
post.addHeader("Authorization", AUTH_HEADER);
post.addHeader("Connection", "close");
try (CloseableHttpResponse response = client.execute(post)) {
if (response.getStatusLine().getStatusCode() != 200) {
return false;
}
String body = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
JsonObject json = JsonParser.parseString(body).getAsJsonObject();
return "ready".equals(json.get("result").getAsString());
}
} catch (Exception e) {
return false;
}
}

@AfterAll
Expand Down Expand Up @@ -223,20 +270,6 @@
assertEquals("1", response.get("result").getAsString());
}

private static boolean isHealthy() {
try {
HttpGet healthCheck = new HttpGet(BASE_URL + "/system/health.json?tags=systemalive,groovyconsole");
healthCheck.addHeader("Authorization", AUTH_HEADER);
try (CloseableHttpResponse response = httpClient.execute(healthCheck)) {
String body = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8);
JsonObject jsonResponse = JsonParser.parseString(body).getAsJsonObject();
return "OK".equals(jsonResponse.get("overallResult").getAsString());
}
} catch (Exception e) {
return false;
}
}

private static JsonObject doGet(String path) throws IOException {
HttpGet get = new HttpGet(BASE_URL + path);
get.addHeader("Authorization", AUTH_HEADER);
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<packaging>pom</packaging>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>

<name>AEM Groovy Console</name>
<description>
Expand Down Expand Up @@ -84,17 +84,17 @@
<properties>
<!-- Maven -->
<maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss.SSSZ</maven.build.timestamp.format>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<timestamp>${maven.build.timestamp}</timestamp>

<!-- Versions -->
<bnd.version>6.4.0</bnd.version>
<aem.version>6.5.10</aem.version>
<groovy.version>4.0.31</groovy.version>
<asm.version>9.7</asm.version>
<groovy.version>5.0.6</groovy.version>
<asm.version>9.9.1</asm.version>
<njord.version>0.9.4</njord.version>

<!-- SonarCloud -->
Expand Down Expand Up @@ -168,8 +168,8 @@
<version>3.8.1</version>
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
<source>1.8</source>
<target>1.8</target>
<source>11</source>
<target>11</target>
<encoding>utf-8</encoding>
</configuration>
<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion ui.apps.aem/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
</parent>

<artifactId>aem-groovy-console-ui.apps.aem</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ui.apps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
</parent>

<artifactId>aem-groovy-console-ui.apps</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion ui.config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
</parent>

<artifactId>aem-groovy-console-ui.config</artifactId>
Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion ui.content/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>be.orbinson.aem</groupId>
<artifactId>aem-groovy-console</artifactId>
<version>19.1.1-SNAPSHOT</version>
<version>20.0.0-SNAPSHOT</version>
</parent>

<artifactId>aem-groovy-console-ui.content</artifactId>
Expand Down
Loading