Skip to content
Open
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
21 changes: 20 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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`:

<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>

<dependency>
<groupId>com.github.farpost</groupId>
<artifactId>groovy-shell-server</artifactId>
<version>2.2.6-jdk21</version>
</dependency>

### 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.

<dependency>
<groupId>me.bazhenov.groovy-shell</groupId>
Expand Down
2 changes: 1 addition & 1 deletion groovy-shell-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>me.bazhenov.groovy-shell</groupId>
<artifactId>groovy-shell-parent</artifactId>
<version>2.2.4-SNAPSHOT</version>
<version>2.2.6-jdk21</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object>(this) {
@Override
public Object call(Object... args) {
Expand Down
78 changes: 11 additions & 67 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.bazhenov.groovy-shell</groupId>
<artifactId>groovy-shell-parent</artifactId>
<packaging>pom</packaging>
<version>2.2.4-SNAPSHOT</version>
<version>2.2.6-jdk21</version>
<name>Groovy Shell</name>
<url>https://github.com/bazhenov/groovy-shell-server</url>

Expand All @@ -19,6 +19,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.release>21</maven.compiler.release>
</properties>

<scm>
Expand All @@ -35,17 +36,6 @@
</developer>
</developers>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
Expand All @@ -64,17 +54,16 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>3.13.0</version>
<configuration>
<release>21</release>
<encoding>UTF-8</encoding>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<version>3.3.1</version>
<executions>
<execution>
<phase>install</phase>
Expand All @@ -87,64 +76,19 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<version>3.11.2</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<doclint>none</doclint>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>nexus-staging</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>gpg</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
</project>