From eb388d3198f0e3cd049fd1c743e4bff42eab15c2 Mon Sep 17 00:00:00 2001 From: Daniil Demidko Date: Mon, 15 Dec 2025 01:46:58 -0300 Subject: [PATCH 1/6] -DnewVersion=2.2.5-jdk25 --- groovy-shell-server/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/groovy-shell-server/pom.xml b/groovy-shell-server/pom.xml index 73e9340..3b448a9 100644 --- a/groovy-shell-server/pom.xml +++ b/groovy-shell-server/pom.xml @@ -7,7 +7,7 @@ me.bazhenov.groovy-shell groovy-shell-parent - 2.2.4-SNAPSHOT + 2.2.5-jdk25 diff --git a/pom.xml b/pom.xml index eb731a8..d93885a 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ me.bazhenov.groovy-shell groovy-shell-parent pom - 2.2.4-SNAPSHOT + 2.2.5-jdk25 Groovy Shell https://github.com/bazhenov/groovy-shell-server From 889fb1ac59eb6d7d615f1c5390e237058fb5fb85 Mon Sep 17 00:00:00 2001 From: Daniil Demidko Date: Mon, 15 Dec 2025 02:03:12 -0300 Subject: [PATCH 2/6] -DnewVersion=2.2.5-jdk25 --- pom.xml | 77 ++++++++++++--------------------------------------------- 1 file changed, 16 insertions(+), 61 deletions(-) diff --git a/pom.xml b/pom.xml index d93885a..fe1727f 100644 --- a/pom.xml +++ b/pom.xml @@ -1,6 +1,6 @@ + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 me.bazhenov.groovy-shell groovy-shell-parent @@ -19,6 +19,7 @@ UTF-8 UTF-8 + 25 @@ -36,13 +37,10 @@ - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + central + maven.bazadev.net-releases + http://maven.bazadev.net/releases/ @@ -64,17 +62,19 @@ org.apache.maven.plugins maven-compiler-plugin - 3.1 + 3.13.0 + 25 UTF-8 - 1.8 - 1.8 + + --enable-preview + org.apache.maven.plugins maven-source-plugin - 2.2.1 + 3.3.1 install @@ -87,64 +87,19 @@ org.apache.maven.plugins maven-javadoc-plugin - 2.9.1 + 3.11.2 install jar + + none + - - - - nexus-staging - - true - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 - true - - ossrh - https://oss.sonatype.org/ - true - - - - - - - gpg - - true - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - install - - sign - - - - - - - - - - + \ No newline at end of file From 4769298830e040fd12f8727c6977c54623483669 Mon Sep 17 00:00:00 2001 From: Daniil Demidko Date: Mon, 15 Dec 2025 02:13:47 -0300 Subject: [PATCH 3/6] Hot-wire the ClassLoader: manually bridge Spring context into detached SSH threads. Bump to JDK 25. --- README.markdown | 8 +++++++- groovy-shell-server/pom.xml | 2 +- .../java/me/bazhenov/groovysh/GroovyShellCommand.java | 2 +- pom.xml | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.markdown b/README.markdown index 6abe590..8301db9 100644 --- a/README.markdown +++ b/README.markdown @@ -99,4 +99,10 @@ Management What if a well-meaning developer fires up a remote shell and accidentally executes a script which hammers the server? Fortunately, each GroovyShellService instance registers itself with the default MBeanServer and provides a "killAllClients" operation to kill any open client sockets and stop the associated client threads. Thus you can connect with jconsole or your favorite JMX frontend -to resolve this issue if it arises. \ No newline at end of file +to resolve this issue if it arises. + +## Deploy + +```shell +mvn deploy -pl client -am -DskipTests +``` \ No newline at end of file diff --git a/groovy-shell-server/pom.xml b/groovy-shell-server/pom.xml index 3b448a9..eb532a8 100644 --- a/groovy-shell-server/pom.xml +++ b/groovy-shell-server/pom.xml @@ -7,7 +7,7 @@ me.bazhenov.groovy-shell groovy-shell-parent - 2.2.5-jdk25 + 2.2.6-jdk25 diff --git a/groovy-shell-server/src/main/java/me/bazhenov/groovysh/GroovyShellCommand.java b/groovy-shell-server/src/main/java/me/bazhenov/groovysh/GroovyShellCommand.java index 3716bf7..00da3a7 100644 --- a/groovy-shell-server/src/main/java/me/bazhenov/groovysh/GroovyShellCommand.java +++ b/groovy-shell-server/src/main/java/me/bazhenov/groovysh/GroovyShellCommand.java @@ -70,7 +70,7 @@ public void start(ChannelSession session, Environment env) throws IOException { IO io = new IO(in, out, err); io.setVerbosity(DEBUG); - Groovysh shell = new Groovysh(createBinding(bindings, out, err), io); + Groovysh shell = new Groovysh(this.getClass().getClassLoader(), createBinding(bindings, out, err), io); shell.setErrorHook(new Closure(this) { @Override public Object call(Object... args) { diff --git a/pom.xml b/pom.xml index fe1727f..b5c2243 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ me.bazhenov.groovy-shell groovy-shell-parent pom - 2.2.5-jdk25 + 2.2.6-jdk25 Groovy Shell https://github.com/bazhenov/groovy-shell-server From a14a59d79ceb1559b9178681bad27bc0cdfea839 Mon Sep 17 00:00:00 2001 From: Daniil Demidko Date: Thu, 18 Dec 2025 00:23:54 -0300 Subject: [PATCH 4/6] jdk 21 lts --- README.markdown | 21 ++++++++++++++++++++- groovy-shell-server/pom.xml | 2 +- pom.xml | 15 ++------------- 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/README.markdown b/README.markdown index 8301db9..c1d4305 100644 --- a/README.markdown +++ b/README.markdown @@ -16,7 +16,26 @@ Groovy shell server uses `groovysh` API inside, so all features of `groovysh` (a Installation ------------ -Just include following dependency in your `pom.xml`: +### Java 21+ + +Current versions of the library require JDK 21 or higher. Include the following dependency in your `pom.xml`: + + + + jitpack.io + https://jitpack.io + + + + + com.github.farpost + groovy-shell-server + 2.2.6-jdk21 + + +### Java 8 / Legacy + +If you are running on an older JVM (Java 8 - 17), please use the `2.2.x` releases (e.g., `2.2.1`). These versions are stable but do not include features requiring newer JDKs. me.bazhenov.groovy-shell diff --git a/groovy-shell-server/pom.xml b/groovy-shell-server/pom.xml index eb532a8..c85817b 100644 --- a/groovy-shell-server/pom.xml +++ b/groovy-shell-server/pom.xml @@ -7,7 +7,7 @@ me.bazhenov.groovy-shell groovy-shell-parent - 2.2.6-jdk25 + 2.2.6-jdk21 diff --git a/pom.xml b/pom.xml index b5c2243..0c85541 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ me.bazhenov.groovy-shell groovy-shell-parent pom - 2.2.6-jdk25 + 2.2.6-jdk21 Groovy Shell https://github.com/bazhenov/groovy-shell-server @@ -36,14 +36,6 @@ - - - central - maven.bazadev.net-releases - http://maven.bazadev.net/releases/ - - - The Apache Software License, Version 2.0 @@ -64,11 +56,8 @@ maven-compiler-plugin 3.13.0 - 25 + 21 UTF-8 - - --enable-preview - From 3d40738da0566388078d48e8ddb0067166f701ef Mon Sep 17 00:00:00 2001 From: Daniil Demidko Date: Thu, 18 Dec 2025 00:32:49 -0300 Subject: [PATCH 5/6] readme updated --- README.markdown | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.markdown b/README.markdown index c1d4305..a62474e 100644 --- a/README.markdown +++ b/README.markdown @@ -118,10 +118,4 @@ Management What if a well-meaning developer fires up a remote shell and accidentally executes a script which hammers the server? Fortunately, each GroovyShellService instance registers itself with the default MBeanServer and provides a "killAllClients" operation to kill any open client sockets and stop the associated client threads. Thus you can connect with jconsole or your favorite JMX frontend -to resolve this issue if it arises. - -## Deploy - -```shell -mvn deploy -pl client -am -DskipTests -``` \ No newline at end of file +to resolve this issue if it arises. \ No newline at end of file From ec6afa25e70acc49b487fcdabdabef175bba7fa0 Mon Sep 17 00:00:00 2001 From: Daniil Demidko Date: Thu, 18 Dec 2025 00:33:43 -0300 Subject: [PATCH 6/6] pom.xml fix --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0c85541..d5177f5 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ UTF-8 UTF-8 - 25 + 21