diff --git a/oak-examples/standalone/pom.xml b/oak-examples/standalone/pom.xml index 20d52710f77..15997f084e1 100644 --- a/oak-examples/standalone/pom.xml +++ b/oak-examples/standalone/pom.xml @@ -212,7 +212,7 @@ 1.0.2 - org.codehaus.groovy + org.apache.groovy groovy ${groovy.version} diff --git a/oak-examples/webapp/pom.xml b/oak-examples/webapp/pom.xml index 8ae44c82229..e6753a902e1 100644 --- a/oak-examples/webapp/pom.xml +++ b/oak-examples/webapp/pom.xml @@ -143,7 +143,7 @@ 1.0.2 - org.codehaus.groovy + org.apache.groovy groovy ${groovy.version} diff --git a/oak-parent/pom.xml b/oak-parent/pom.xml index 39755b83c34..d4555aad08d 100644 --- a/oak-parent/pom.xml +++ b/oak-parent/pom.xml @@ -70,7 +70,7 @@ 2.0.5 4.14.0 2.6.17 - 3.0.25 + 4.0.33 4.1.136.Final 2.36.3 @@ -240,7 +240,7 @@ org.codehaus.gmavenplus gmavenplus-plugin - 3.0.2 + 4.3.1 maven-deploy-plugin diff --git a/oak-run/pom.xml b/oak-run/pom.xml index 2b7dca92ba9..429b812b3d4 100644 --- a/oak-run/pom.xml +++ b/oak-run/pom.xml @@ -34,6 +34,7 @@ 9.4.53.v20231009 - 92274688 + 96274688 @@ -273,28 +274,24 @@ jopt-simple - org.codehaus.groovy + org.apache.groovy groovy ${groovy.version} - indy - org.codehaus.groovy + org.apache.groovy groovy-json ${groovy.version} - indy - org.codehaus.groovy + org.apache.groovy groovy-cli-picocli ${groovy.version} - indy - org.codehaus.groovy + org.apache.groovy groovy-groovysh ${groovy.version} - indy org.mongodb diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/GroovyConsole.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/GroovyConsole.groovy index 904ab15a609..f50238c2c84 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/GroovyConsole.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/GroovyConsole.groovy @@ -23,21 +23,51 @@ import groovy.transform.TypeCheckingMode import jline.Terminal import jline.TerminalFactory import jline.console.history.FileHistory +import org.apache.jackrabbit.oak.console.commands.CdCommand +import org.apache.jackrabbit.oak.console.commands.CheckpointCommand +import org.apache.jackrabbit.oak.console.commands.ExportCommand +import org.apache.jackrabbit.oak.console.commands.ExportRelevantDocumentsCommand +import org.apache.jackrabbit.oak.console.commands.LsCommand +import org.apache.jackrabbit.oak.console.commands.LsdDocumentCommand +import org.apache.jackrabbit.oak.console.commands.LuceneCommand +import org.apache.jackrabbit.oak.console.commands.OakHelpCommand +import org.apache.jackrabbit.oak.console.commands.PnCommand +import org.apache.jackrabbit.oak.console.commands.PrintDocumentCommand +import org.apache.jackrabbit.oak.console.commands.RefreshCommand +import org.apache.jackrabbit.oak.console.commands.RetrieveCommand import org.apache.jackrabbit.oak.run.commons.Utils -import org.apache.jackrabbit.oak.console.commands.* import org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore +import org.apache.groovy.groovysh.AnsiDetector +import org.apache.groovy.groovysh.ExitNotification +import org.apache.groovy.groovysh.Groovysh +import org.apache.groovy.groovysh.InteractiveShellRunner +import org.apache.groovy.groovysh.Command as ShellCommand +import org.apache.groovy.groovysh.commands.AliasCommand +import org.apache.groovy.groovysh.commands.ClearCommand +import org.apache.groovy.groovysh.commands.DisplayCommand +import org.apache.groovy.groovysh.commands.DocCommand +import org.apache.groovy.groovysh.commands.EditCommand +import org.apache.groovy.groovysh.commands.ExitCommand +import org.apache.groovy.groovysh.commands.HistoryCommand +import org.apache.groovy.groovysh.commands.ImportCommand +import org.apache.groovy.groovysh.commands.InspectCommand +import org.apache.groovy.groovysh.commands.LoadCommand +import org.apache.groovy.groovysh.commands.PurgeCommand +import org.apache.groovy.groovysh.commands.RecordCommand +import org.apache.groovy.groovysh.commands.RegisterCommand +import org.apache.groovy.groovysh.commands.SaveCommand +import org.apache.groovy.groovysh.commands.SetCommand +import org.apache.groovy.groovysh.commands.ShowCommand import org.codehaus.groovy.runtime.StackTraceUtils -import org.codehaus.groovy.tools.shell.* -import org.codehaus.groovy.tools.shell.Command as ShellCommand -import org.codehaus.groovy.tools.shell.commands.* import org.codehaus.groovy.tools.shell.util.Logger +import org.codehaus.groovy.tools.shell.IO import org.codehaus.groovy.tools.shell.util.Preferences import org.fusesource.jansi.Ansi import org.fusesource.jansi.AnsiConsole import org.fusesource.jansi.AnsiRenderer /** - * Some part of logic is based on usage in org.codehaus.groovy.tools.shell.Main + * Some part of logic is based on usage in org.apache.groovy.tools.shell.Main */ @CompileStatic class GroovyConsole { @@ -175,7 +205,7 @@ class GroovyConsole { throw new IllegalStateException("Error hook is not set") } if (cause instanceof MissingPropertyException) { - if (cause.type && cause.type.canonicalName == Interpreter.SCRIPT_FILENAME) { + if (cause.type && cause.type.canonicalName == "groovysh_evaluate") { io.err.println("@|bold,red Unknown property|@: " + cause.property) return } diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/CdCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/CdCommand.groovy index 98811828811..b62f6017393 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/CdCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/CdCommand.groovy @@ -22,9 +22,9 @@ import jline.console.completer.Completer import org.apache.jackrabbit.oak.commons.PathUtils import org.apache.jackrabbit.oak.commons.collections.IterableUtils import org.apache.jackrabbit.oak.console.ConsoleSession -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh -import org.codehaus.groovy.tools.shell.util.SimpleCompletor +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh +import org.apache.groovy.groovysh.util.SimpleCompleter class CdCommand extends CommandSupport{ public static final String COMMAND_NAME = 'change-dir' @@ -35,7 +35,7 @@ class CdCommand extends CommandSupport{ @Override protected List createCompleters() { - SimpleCompletor completor = new SimpleCompletor(){ + SimpleCompleter completor = new SimpleCompleter(){ @Override SortedSet getCandidates() { SortedSet names = new TreeSet() diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/CheckpointCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/CheckpointCommand.groovy index a50f7c51568..20610ddf6e1 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/CheckpointCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/CheckpointCommand.groovy @@ -20,8 +20,8 @@ package org.apache.jackrabbit.oak.console.commands import groovy.transform.CompileStatic import org.apache.jackrabbit.oak.console.ConsoleSession -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh import java.util.concurrent.TimeUnit diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/ExportCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/ExportCommand.groovy index 5a4772f9c2b..a94d30f7f0d 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/ExportCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/ExportCommand.groovy @@ -22,8 +22,8 @@ package org.apache.jackrabbit.oak.console.commands import org.apache.jackrabbit.oak.commons.PathUtils import org.apache.jackrabbit.oak.console.ConsoleSession import org.apache.jackrabbit.oak.exporter.NodeStateSerializer -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh import groovy.cli.picocli.CliBuilder class ExportCommand extends CommandSupport{ diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/ExportRelevantDocumentsCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/ExportRelevantDocumentsCommand.groovy index b5eabf11d98..13b665d3969 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/ExportRelevantDocumentsCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/ExportRelevantDocumentsCommand.groovy @@ -25,8 +25,8 @@ import org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore import org.apache.jackrabbit.oak.plugins.document.DocumentStore import org.apache.jackrabbit.oak.plugins.document.NodeDocument import org.apache.jackrabbit.oak.plugins.document.util.Utils -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh import groovy.cli.picocli.CliBuilder class ExportRelevantDocumentsCommand extends CommandSupport { diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LsCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LsCommand.groovy index fd38c33f78c..54cb55763a3 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LsCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LsCommand.groovy @@ -21,8 +21,8 @@ package org.apache.jackrabbit.oak.console.commands import groovy.transform.CompileStatic import org.apache.jackrabbit.oak.commons.collections.IterableUtils import org.apache.jackrabbit.oak.console.ConsoleSession -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh @CompileStatic class LsCommand extends CommandSupport{ diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LsdDocumentCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LsdDocumentCommand.groovy index 55ec16eb842..964ecc1f642 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LsdDocumentCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LsdDocumentCommand.groovy @@ -24,8 +24,8 @@ import org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore import org.apache.jackrabbit.oak.plugins.document.NodeDocument import org.apache.jackrabbit.oak.plugins.document.Path import org.apache.jackrabbit.oak.plugins.document.util.Utils -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh import static org.apache.jackrabbit.oak.plugins.document.Collection.NODES diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LuceneCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LuceneCommand.groovy index dbea3e1bb79..00ddbcc4757 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LuceneCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/LuceneCommand.groovy @@ -35,8 +35,8 @@ import org.apache.lucene.index.DirectoryReader import org.apache.lucene.store.Directory import org.apache.lucene.store.FSDirectory import org.apache.lucene.store.IOContext -import org.codehaus.groovy.tools.shell.ComplexCommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.ComplexCommandSupport +import org.apache.groovy.groovysh.Groovysh import org.apache.jackrabbit.oak.spi.state.NodeBuilder as OakNodeBuilder diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/OakHelpCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/OakHelpCommand.groovy index 703d409b887..814039cf80b 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/OakHelpCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/OakHelpCommand.groovy @@ -18,13 +18,13 @@ */ package org.apache.jackrabbit.oak.console.commands -import org.codehaus.groovy.tools.shell.Command -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh -import org.codehaus.groovy.tools.shell.completion.CommandNameCompleter +import org.apache.groovy.groovysh.Command +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh +import org.apache.groovy.groovysh.completion.CommandNameCompleter /** - * Copy of org.codehaus.groovy.tools.shell.commands.HelpCommand to customize + * Copy of org.apache.groovy.tools.shell.commands.HelpCommand to customize * the banner */ class OakHelpCommand extends CommandSupport{ diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/PnCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/PnCommand.groovy index 987b6df5dd7..0d01370db0f 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/PnCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/PnCommand.groovy @@ -21,8 +21,8 @@ package org.apache.jackrabbit.oak.console.commands import groovy.transform.CompileStatic import org.apache.jackrabbit.oak.console.ConsoleSession import org.apache.jackrabbit.oak.nodestate.NodeStateHelper -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh @CompileStatic class PnCommand extends CommandSupport{ diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/PrintDocumentCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/PrintDocumentCommand.groovy index 1cf646a86c5..820e8698eb3 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/PrintDocumentCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/PrintDocumentCommand.groovy @@ -23,8 +23,8 @@ import org.apache.jackrabbit.oak.console.ConsoleSession import org.apache.jackrabbit.oak.plugins.document.DocumentNodeStore import org.apache.jackrabbit.oak.plugins.document.NodeDocument import org.apache.jackrabbit.oak.plugins.document.util.Utils -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh import org.json.simple.JSONObject import org.json.simple.JSONValue diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/RefreshCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/RefreshCommand.groovy index 8691296490d..b7edf1f3475 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/RefreshCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/RefreshCommand.groovy @@ -20,8 +20,8 @@ package org.apache.jackrabbit.oak.console.commands import groovy.transform.CompileStatic import org.apache.jackrabbit.oak.console.ConsoleSession -import org.codehaus.groovy.tools.shell.ComplexCommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.ComplexCommandSupport +import org.apache.groovy.groovysh.Groovysh @CompileStatic class RefreshCommand extends ComplexCommandSupport{ diff --git a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/RetrieveCommand.groovy b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/RetrieveCommand.groovy index 682f2e6765b..9433dc17346 100644 --- a/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/RetrieveCommand.groovy +++ b/oak-run/src/main/groovy/org/apache/jackrabbit/oak/console/commands/RetrieveCommand.groovy @@ -20,8 +20,8 @@ package org.apache.jackrabbit.oak.console.commands import groovy.transform.CompileStatic import org.apache.jackrabbit.oak.console.ConsoleSession -import org.codehaus.groovy.tools.shell.CommandSupport -import org.codehaus.groovy.tools.shell.Groovysh +import org.apache.groovy.groovysh.CommandSupport +import org.apache.groovy.groovysh.Groovysh @CompileStatic class RetrieveCommand extends CommandSupport{