This is an automated email from the ASF dual-hosted git repository.
robbie pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 5ab9765345 ARTEMIS-4974 Removing Run from Shell
5ab9765345 is described below
commit 5ab97653459fffd01931cc3ea3d08760125878a7
Author: Clebert Suconic <[email protected]>
AuthorDate: Tue Aug 6 11:55:58 2024 -0400
ARTEMIS-4974 Removing Run from Shell
---
.../main/java/org/apache/activemq/artemis/cli/Artemis.java | 5 ++++-
.../java/org/apache/activemq/artemis/cli/commands/Run.java | 13 -------------
2 files changed, 4 insertions(+), 14 deletions(-)
diff --git
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
index af60285461..c8725c95d3 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java
@@ -284,7 +284,10 @@ public class Artemis implements Runnable {
commandLine.addSubcommand(new DataGroup(commandLine));
commandLine.addSubcommand(new UserGroup(commandLine));
- commandLine.addSubcommand(new Run());
+ if (!Shell.inShell()) {
+ commandLine.addSubcommand(new Run());
+ }
+
commandLine.addSubcommand(new Stop());
commandLine.addSubcommand(new Kill());
commandLine.addSubcommand(new PerfJournal());
diff --git
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
index 9588e2d358..59c90563a3 100644
---
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
+++
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
@@ -24,8 +24,6 @@ import java.util.concurrent.atomic.AtomicReference;
import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
import org.apache.activemq.artemis.api.core.Pair;
import org.apache.activemq.artemis.cli.Artemis;
-import org.apache.activemq.artemis.cli.Shell;
-import org.apache.activemq.artemis.cli.Terminal;
import org.apache.activemq.artemis.cli.commands.tools.LockAbstract;
import org.apache.activemq.artemis.cli.factory.BrokerFactory;
import org.apache.activemq.artemis.cli.factory.jmx.ManagementFactory;
@@ -76,17 +74,6 @@ public class Run extends LockAbstract {
@Override
public Object execute(ActionContext context) throws Exception {
-
- if (Shell.inShell()) {
-
- String scriptStart = "./artemis";
- if (System.getProperty("os.name",
"linux").toLowerCase().trim().startsWith("win")) {
- scriptStart = "artemis.cmd";
- }
- System.out.println(Terminal.RED_UNICODE + "ERROR: The run command is
not supported in the artemis shell. Please use '" + scriptStart + " run'
directly." + Terminal.CLEAR_UNICODE);
- return null;
- }
-
super.execute(context);
verifyOlderLogging(new File(getBrokerEtc()));
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact