[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-08-01 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873993&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873993
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 01/Aug/23 08:37
Start Date: 01/Aug/23 08:37
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1280291519


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java:
##
@@ -194,68 +191,140 @@ public static Object execute(boolean inputEnabled, 
boolean useSystemOut, File ar
 * Useful on test cases
 */
private static Object internalExecute(File artemisHome, File 
artemisInstance, File etcFolder, String[] args) throws Exception {
-  return internalExecute(artemisHome, artemisInstance, etcFolder, args, 
ActionContext.system());
+  return internalExecute(artemisHome, artemisInstance, etcFolder, args, 
new ActionContext());
}
 
public static Object internalExecute(File artemisHome, File 
artemisInstance, File etcFolder, String[] args, ActionContext context) throws 
Exception {
-  Action action = builder(artemisInstance).build().parse(args);
-  action.setHomeValues(artemisHome, artemisInstance, etcFolder);
+  boolean isInstance = artemisInstance != null || 
System.getProperty("artemis.instance") != null;
+  CommandLine commandLine = buildCommand(isInstance, !isInstance);
+
+  Object userObject = parseAction(commandLine, args);
+
+  // Pico shouldn't allow generating a commandLine without an userObject.
+  // the following assert "should" never happen
+  assert userObject != null;

Review Comment:
   Fair enough. You didnt note the last bit before, just that 'we shouldnt add 
things that arent Runnable or Action', then you added the fallback check which 
would NPE if it was null, which I then noted.  I'd still have just added a 
simple Objects.nonNull("oh-dear developer-error", userObject) rather than the 
multi line assert+comment that quite posibly still wont do anything and allow 
the raw NPE to occur.





Issue Time Tracking
---

Worklog Id: (was: 873993)
Time Spent: 6h 50m  (was: 6h 40m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 6h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873936&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873936
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 01/Aug/23 02:15
Start Date: 01/Aug/23 02:15
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1280044335


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java:
##
@@ -157,68 +174,132 @@ private ConnectionFactory 
createAMQPConnectionFactory(String brokerURL,
   }
 
   try {
- Connection connection = cf.createConnection();
- connection.close();
+ tryConnect(brokerURL, user, password, cf);
  return cf;
   } catch (JMSSecurityException e) {
  // if a security exception will get the user and password through an 
input
  getActionContext().err.println("Connection failed::" + 
e.getMessage());
- cf = new JmsConnectionFactory(inputUser(user), 
inputPassword(password), brokerURL);
+ user = inputUser(user);
+ password = inputPassword(password);
+ cf = new JmsConnectionFactory(user, password, brokerURL);
  if (clientID != null) {
 cf.setClientID(clientID);
  }
+ try {
+tryConnect(brokerURL, user, password, cf);
+ } catch (Exception e2) {
+e.printStackTrace();
+ }
  return cf;
   } catch (JMSException e) {
  // if a connection exception will ask for the URL, user and password
  getActionContext().err.println("Connection failed::" + 
e.getMessage());
- cf = new JmsConnectionFactory(inputUser(user), 
inputPassword(password), inputBrokerURL(brokerURL));
+ brokerURL = inputBrokerURL(brokerURL);
+ user = inputUser(user);
+ password = inputPassword(password);
+ cf = new JmsConnectionFactory(user, password, brokerURL);
  if (clientID != null) {
 cf.setClientID(clientID);
  }
+ try {
+tryConnect(brokerURL, user, password, cf);
+ } catch (Exception e2) {
+e2.printStackTrace();
+ }
  return cf;
   }
}
 
protected ActiveMQConnectionFactory createCoreConnectionFactory() {
+  recoverConnectionInformation();
   return createCoreConnectionFactory(brokerURL, user, password, clientID);
}
 
+   private void recoverConnectionInformation() {
+  if (CONNECTION_INFORMATION.get() != null) {
+ ConnectionInformation connectionInfo = CONNECTION_INFORMATION.get();
+ if (this.user == null) {
+this.user  = connectionInfo.user;
+ }
+ if (this.password == null) {
+this.password  = connectionInfo.password;
+ }
+ if (this.brokerURL == null) {
+this.brokerURL  = connectionInfo.uri;
+ }
+
+  }
+   }
+
+   void saveConnectionInfo(String brokerURL, String user, String password) {
+  if (Shell.inShell() && CONNECTION_INFORMATION.get() == null) {
+ CONNECTION_INFORMATION.set(new ConnectionInformation(brokerURL, user, 
password));
+ System.out.println("CLI connected to broker " + brokerURL + ", user:" 
+ user);
+  }
+   }
+
protected ActiveMQConnectionFactory createCoreConnectionFactory(String 
brokerURL,
String user,
String 
password,
String 
clientID) {
+  if (brokerURL.startsWith("amqp://")) {
+ // replacing amqp:// by tcp://
+ brokerURL = "tcp" + brokerURL.substring(4);
+  }
+
   ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(brokerURL, 
user, password);
   if (clientID != null) {
  getActionContext().out.println("Consumer:: clientID = " + clientID);
  cf.setClientID(clientID);
   }
   try {
- Connection connection = cf.createConnection();
- connection.close();
+ tryConnect(brokerURL, user, password, cf);
  return cf;
   } catch (JMSSecurityException e) {
  // if a security exception will get the user and password through an 
input
  if (getActionContext() != null) {
 getActionContext().err.println("Connection failed::" + 
e.getMessage());
  }
- cf = new ActiveMQConnectionFactory(brokerURL, inputUser(user), 
inputPassword(password));
+ user = inputUser(user);
+ password = inputPassword(password);
+ cf = new ActiveMQConnectionFactory(brokerURL, user, password);
  if (clientID != null) {
   

[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873896&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873896
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 31/Jul/23 20:32
Start Date: 31/Jul/23 20:32
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1279851195


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java:
##
@@ -157,68 +174,132 @@ private ConnectionFactory 
createAMQPConnectionFactory(String brokerURL,
   }
 
   try {
- Connection connection = cf.createConnection();
- connection.close();
+ tryConnect(brokerURL, user, password, cf);
  return cf;
   } catch (JMSSecurityException e) {
  // if a security exception will get the user and password through an 
input
  getActionContext().err.println("Connection failed::" + 
e.getMessage());
- cf = new JmsConnectionFactory(inputUser(user), 
inputPassword(password), brokerURL);
+ user = inputUser(user);
+ password = inputPassword(password);
+ cf = new JmsConnectionFactory(user, password, brokerURL);
  if (clientID != null) {
 cf.setClientID(clientID);
  }
+ try {
+tryConnect(brokerURL, user, password, cf);
+ } catch (Exception e2) {
+e.printStackTrace();
+ }
  return cf;
   } catch (JMSException e) {
  // if a connection exception will ask for the URL, user and password
  getActionContext().err.println("Connection failed::" + 
e.getMessage());
- cf = new JmsConnectionFactory(inputUser(user), 
inputPassword(password), inputBrokerURL(brokerURL));
+ brokerURL = inputBrokerURL(brokerURL);
+ user = inputUser(user);
+ password = inputPassword(password);
+ cf = new JmsConnectionFactory(user, password, brokerURL);
  if (clientID != null) {
 cf.setClientID(clientID);
  }
+ try {
+tryConnect(brokerURL, user, password, cf);
+ } catch (Exception e2) {
+e2.printStackTrace();
+ }
  return cf;
   }
}
 
protected ActiveMQConnectionFactory createCoreConnectionFactory() {
+  recoverConnectionInformation();
   return createCoreConnectionFactory(brokerURL, user, password, clientID);
}
 
+   private void recoverConnectionInformation() {
+  if (CONNECTION_INFORMATION.get() != null) {
+ ConnectionInformation connectionInfo = CONNECTION_INFORMATION.get();
+ if (this.user == null) {
+this.user  = connectionInfo.user;
+ }
+ if (this.password == null) {
+this.password  = connectionInfo.password;
+ }
+ if (this.brokerURL == null) {
+this.brokerURL  = connectionInfo.uri;
+ }
+
+  }
+   }
+
+   void saveConnectionInfo(String brokerURL, String user, String password) {
+  if (Shell.inShell() && CONNECTION_INFORMATION.get() == null) {
+ CONNECTION_INFORMATION.set(new ConnectionInformation(brokerURL, user, 
password));
+ System.out.println("CLI connected to broker " + brokerURL + ", user:" 
+ user);
+  }
+   }
+
protected ActiveMQConnectionFactory createCoreConnectionFactory(String 
brokerURL,
String user,
String 
password,
String 
clientID) {
+  if (brokerURL.startsWith("amqp://")) {
+ // replacing amqp:// by tcp://
+ brokerURL = "tcp" + brokerURL.substring(4);
+  }
+
   ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(brokerURL, 
user, password);
   if (clientID != null) {
  getActionContext().out.println("Consumer:: clientID = " + clientID);
  cf.setClientID(clientID);
   }
   try {
- Connection connection = cf.createConnection();
- connection.close();
+ tryConnect(brokerURL, user, password, cf);
  return cf;
   } catch (JMSSecurityException e) {
  // if a security exception will get the user and password through an 
input
  if (getActionContext() != null) {
 getActionContext().err.println("Connection failed::" + 
e.getMessage());
  }
- cf = new ActiveMQConnectionFactory(brokerURL, inputUser(user), 
inputPassword(password));
+ user = inputUser(user);
+ password = inputPassword(password);
+ cf = new ActiveMQConnectionFactory(brokerURL, user, password);
  if (clientID != null) {
   

[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873866&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873866
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 31/Jul/23 17:02
Start Date: 31/Jul/23 17:02
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1279627523


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java:
##
@@ -194,68 +191,140 @@ public static Object execute(boolean inputEnabled, 
boolean useSystemOut, File ar
 * Useful on test cases
 */
private static Object internalExecute(File artemisHome, File 
artemisInstance, File etcFolder, String[] args) throws Exception {
-  return internalExecute(artemisHome, artemisInstance, etcFolder, args, 
ActionContext.system());
+  return internalExecute(artemisHome, artemisInstance, etcFolder, args, 
new ActionContext());
}
 
public static Object internalExecute(File artemisHome, File 
artemisInstance, File etcFolder, String[] args, ActionContext context) throws 
Exception {
-  Action action = builder(artemisInstance).build().parse(args);
-  action.setHomeValues(artemisHome, artemisInstance, etcFolder);
+  boolean isInstance = artemisInstance != null || 
System.getProperty("artemis.instance") != null;
+  CommandLine commandLine = buildCommand(isInstance, !isInstance);
+
+  Object userObject = parseAction(commandLine, args);
+
+  // Pico shouldn't allow generating a commandLine without an userObject.
+  // the following assert "should" never happen
+  assert userObject != null;

Review Comment:
   this is never supposed to happen. 
   Only chance userObject is null is if you set the userObject wrongly during 
development. and picocli actually validate that already.





Issue Time Tracking
---

Worklog Id: (was: 873866)
Time Spent: 6h 20m  (was: 6h 10m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 6h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873858&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873858
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 31/Jul/23 16:42
Start Date: 31/Jul/23 16:42
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1279379655


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java:
##
@@ -157,68 +174,132 @@ private ConnectionFactory 
createAMQPConnectionFactory(String brokerURL,
   }
 
   try {
- Connection connection = cf.createConnection();
- connection.close();
+ tryConnect(brokerURL, user, password, cf);
  return cf;
   } catch (JMSSecurityException e) {
  // if a security exception will get the user and password through an 
input
  getActionContext().err.println("Connection failed::" + 
e.getMessage());
- cf = new JmsConnectionFactory(inputUser(user), 
inputPassword(password), brokerURL);
+ user = inputUser(user);
+ password = inputPassword(password);
+ cf = new JmsConnectionFactory(user, password, brokerURL);
  if (clientID != null) {
 cf.setClientID(clientID);
  }
+ try {
+tryConnect(brokerURL, user, password, cf);
+ } catch (Exception e2) {
+e.printStackTrace();
+ }
  return cf;
   } catch (JMSException e) {
  // if a connection exception will ask for the URL, user and password
  getActionContext().err.println("Connection failed::" + 
e.getMessage());
- cf = new JmsConnectionFactory(inputUser(user), 
inputPassword(password), inputBrokerURL(brokerURL));
+ brokerURL = inputBrokerURL(brokerURL);
+ user = inputUser(user);
+ password = inputPassword(password);
+ cf = new JmsConnectionFactory(user, password, brokerURL);
  if (clientID != null) {
 cf.setClientID(clientID);
  }
+ try {
+tryConnect(brokerURL, user, password, cf);
+ } catch (Exception e2) {
+e2.printStackTrace();
+ }
  return cf;
   }
}
 
protected ActiveMQConnectionFactory createCoreConnectionFactory() {
+  recoverConnectionInformation();
   return createCoreConnectionFactory(brokerURL, user, password, clientID);
}
 
+   private void recoverConnectionInformation() {
+  if (CONNECTION_INFORMATION.get() != null) {
+ ConnectionInformation connectionInfo = CONNECTION_INFORMATION.get();
+ if (this.user == null) {
+this.user  = connectionInfo.user;
+ }
+ if (this.password == null) {
+this.password  = connectionInfo.password;
+ }
+ if (this.brokerURL == null) {
+this.brokerURL  = connectionInfo.uri;
+ }
+
+  }
+   }
+
+   void saveConnectionInfo(String brokerURL, String user, String password) {
+  if (Shell.inShell() && CONNECTION_INFORMATION.get() == null) {
+ CONNECTION_INFORMATION.set(new ConnectionInformation(brokerURL, user, 
password));
+ System.out.println("CLI connected to broker " + brokerURL + ", user:" 
+ user);
+  }
+   }
+
protected ActiveMQConnectionFactory createCoreConnectionFactory(String 
brokerURL,
String user,
String 
password,
String 
clientID) {
+  if (brokerURL.startsWith("amqp://")) {
+ // replacing amqp:// by tcp://
+ brokerURL = "tcp" + brokerURL.substring(4);
+  }
+
   ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory(brokerURL, 
user, password);
   if (clientID != null) {
  getActionContext().out.println("Consumer:: clientID = " + clientID);
  cf.setClientID(clientID);
   }
   try {
- Connection connection = cf.createConnection();
- connection.close();
+ tryConnect(brokerURL, user, password, cf);
  return cf;
   } catch (JMSSecurityException e) {
  // if a security exception will get the user and password through an 
input
  if (getActionContext() != null) {
 getActionContext().err.println("Connection failed::" + 
e.getMessage());
  }
- cf = new ActiveMQConnectionFactory(brokerURL, inputUser(user), 
inputPassword(password));
+ user = inputUser(user);
+ password = inputPassword(password);
+ cf = new ActiveMQConnectionFactory(brokerURL, user, password);
  if (clientID != null) {
 cf.s

[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873817&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873817
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 31/Jul/23 14:40
Start Date: 31/Jul/23 14:40
Worklog Time Spent: 10m 
  Work Description: clebertsuconic merged PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565




Issue Time Tracking
---

Worklog Id: (was: 873817)
Time Spent: 6h  (was: 5h 50m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 6h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873816&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873816
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 31/Jul/23 14:39
Start Date: 31/Jul/23 14:39
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4565:
URL: 
https://github.com/apache/activemq-artemis/pull/4565#issuecomment-1658502892

   @gemmellr I am merging this... further changes can be sent into main after 
this.
   
   
   Thanks for your help on this




Issue Time Tracking
---

Worklog Id: (was: 873816)
Time Spent: 5h 50m  (was: 5h 40m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 5h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873792&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873792
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 31/Jul/23 13:05
Start Date: 31/Jul/23 13:05
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1279267330


##
artemis-cli/pom.xml:
##
@@ -124,10 +124,17 @@
  jakarta.xml.bind-api
  ${jakarta.xml.bind-api.version}
   
-
   
- com.github.rvesse
- airline
+ info.picocli
+ picocli
+  
+  
+ info.picocli
+ picocli-shell-jline3
+  
+  
+ org.jline
+ jline

Review Comment:
   @gnodet thank you so much for your help here.





Issue Time Tracking
---

Worklog Id: (was: 873792)
Time Spent: 5h 40m  (was: 5.5h)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 5h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873791&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873791
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 31/Jul/23 12:57
Start Date: 31/Jul/23 12:57
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1279258496


##
artemis-cli/pom.xml:
##
@@ -124,10 +124,17 @@
  jakarta.xml.bind-api
  ${jakarta.xml.bind-api.version}
   
-
   
- com.github.rvesse
- airline
+ info.picocli
+ picocli
+  
+  
+ info.picocli
+ picocli-shell-jline3
+  
+  
+ org.jline
+ jline

Review Comment:
   @gnodet thank you so much.. that worked like a charm!
   
   
   @gemmellr  ^^^ C/C





Issue Time Tracking
---

Worklog Id: (was: 873791)
Time Spent: 5.5h  (was: 5h 20m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 5.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873790&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873790
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 31/Jul/23 12:39
Start Date: 31/Jul/23 12:39
Worklog Time Spent: 10m 
  Work Description: gnodet commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1279185868


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Shell.java:
##
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.cli;
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.function.Supplier;
+
+import org.jline.console.SystemRegistry;
+import org.jline.console.impl.SystemRegistryImpl;
+import org.jline.reader.EndOfFileException;
+import org.jline.reader.LineReader;
+import org.jline.reader.LineReaderBuilder;
+import org.jline.reader.MaskingCallback;
+import org.jline.reader.Parser;
+import org.jline.reader.UserInterruptException;
+import org.jline.reader.impl.DefaultParser;
+import org.jline.terminal.Terminal;
+import org.jline.terminal.TerminalBuilder;
+import picocli.CommandLine;
+import picocli.CommandLine.Command;
+import picocli.shell.jline3.PicocliCommands;
+
+@Command(name = "shell", description = "JLine3 shell helping using the CLI")
+public class Shell implements Runnable {
+
+   private static String RED_UNICODE = "\u001B[31m";
+   private static String YELLOW_UNICODE = "\u001B[33m";
+   private static String CLEAR_UNICODE = "\u001B[0m";
+
+   public Shell(CommandLine commandLine) {
+   }
+
+   @Override
+   public void run() {
+  runShell();
+   }
+
+   private static ThreadLocal IN_SHELL = 
ThreadLocal.withInitial(() -> new AtomicBoolean(false));
+
+   public static boolean inShell() {
+  return IN_SHELL.get().get();
+   }
+
+   public static void runShell() {
+  try {
+ IN_SHELL.get().set(true);
+
+ boolean isInstance = System.getProperty("artemis.instance") != null;
+
+ Supplier workDir = () -> 
Paths.get(System.getProperty("user.dir"));
+
+ PicocliCommands.PicocliCommandsFactory factory = new 
PicocliCommands.PicocliCommandsFactory();
+
+ CommandLine commandLine = Artemis.buildCommand(isInstance, 
!isInstance, true);
+
+ PicocliCommands picocliCommands = new PicocliCommands(commandLine);
+
+ Parser parser = new DefaultParser();
+ try (Terminal terminal = TerminalBuilder.builder().build()) {

Review Comment:
   As a shortcut, you could use `TerminalBuilder.terminal()`



##
artemis-distribution/src/main/resources/bin/artemis:
##
@@ -91,6 +91,9 @@ if $cygwin ; then
 fi
 
 exec "$JAVACMD" $JAVA_ARGS $ARTEMIS_CLUSTER_PROPS \
+--add-opens java.base/java.lang=ALL-UNNAMED \
+--add-opens java.base/java.io=ALL-UNNAMED \
+--add-opens java.base/java.util=ALL-UNNAMED \

Review Comment:
   See above, adding jansi will remove the need for those options.



##
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis:
##
@@ -102,6 +102,9 @@ fi
 
 exec "$JAVACMD" \
 $JAVA_ARGS \
+--add-opens java.base/java.lang=ALL-UNNAMED \
+--add-opens java.base/java.io=ALL-UNNAMED \
+--add-opens java.base/java.util=ALL-UNNAMED \

Review Comment:
   Adding the jansi library will remove the need for those additional JVM 
options.  Those are only required when using the exec provider, which won't be 
used if you add jansi to support windows.



##
artemis-cli/pom.xml:
##
@@ -124,10 +124,17 @@
  jakarta.xml.bind-api
  ${jakarta.xml.bind-api.version}
   
-
   
- com.github.rvesse
- airline
+ info.picocli
+ picocli
+  
+  
+ info.picocli
+ picocli-shell-jline3
+  
+  
+ org.jline
+ jline

Review Comment:
   In order to support Windows properly, you need to add a dependency on jansi 
or jna.  I sug

[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-31 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873718&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873718
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 31/Jul/23 08:53
Start Date: 31/Jul/23 08:53
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1278982761


##
artemis-distribution/src/main/resources/bin/artemis:
##
@@ -91,6 +91,9 @@ if $cygwin ; then
 fi
 
 exec "$JAVACMD" $JAVA_ARGS $ARTEMIS_CLUSTER_PROPS \
+--add-opens java.base/java.lang=ALL-UNNAMED \
+--add-opens java.base/java.io=ALL-UNNAMED \
+--add-opens java.base/java.util=ALL-UNNAMED \

Review Comment:
   Its not actually surprising that behaviour here might differ on different 
JDKs, thats exactly why I wondered if you tried it on the newer ones, 
especially with JDK21 almost done (RC1 due in 10 days, later RC2 if needed; 
JDK17 didnt get an RC2)...though I was more concerned it may need other config, 
than not need any, we will need to use what works for them all.





Issue Time Tracking
---

Worklog Id: (was: 873718)
Time Spent: 5h 10m  (was: 5h)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 5h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873599&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873599
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 19:33
Start Date: 28/Jul/23 19:33
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1278011424


##
artemis-distribution/src/main/resources/bin/artemis:
##
@@ -91,6 +91,9 @@ if $cygwin ; then
 fi
 
 exec "$JAVACMD" $JAVA_ARGS $ARTEMIS_CLUSTER_PROPS \
+--add-opens java.base/java.lang=ALL-UNNAMED \
+--add-opens java.base/java.io=ALL-UNNAMED \
+--add-opens java.base/java.util=ALL-UNNAMED \

Review Comment:
   @gnodet I"m adding jline3 into artemis, integrated with pico-CLI. This PR is 
taking an example from the jline3 along with some examples I saw on pico-cli .. 
and I had to include these with JDK-11, while these are not needed in 17.
   
   
   I'm confused what I need to do to integrate this. can you help us here?



##
artemis-distribution/src/main/resources/bin/artemis:
##
@@ -91,6 +91,9 @@ if $cygwin ; then
 fi
 
 exec "$JAVACMD" $JAVA_ARGS $ARTEMIS_CLUSTER_PROPS \
+--add-opens java.base/java.lang=ALL-UNNAMED \
+--add-opens java.base/java.io=ALL-UNNAMED \
+--add-opens java.base/java.util=ALL-UNNAMED \

Review Comment:
   hmmm... I don't need these with JDK17.
   
   @gnodet it would be so nice to get your help here? :) 





Issue Time Tracking
---

Worklog Id: (was: 873599)
Time Spent: 5h  (was: 4h 50m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873598&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873598
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 19:32
Start Date: 28/Jul/23 19:32
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1278010468


##
artemis-distribution/src/main/resources/bin/artemis:
##
@@ -91,6 +91,9 @@ if $cygwin ; then
 fi
 
 exec "$JAVACMD" $JAVA_ARGS $ARTEMIS_CLUSTER_PROPS \
+--add-opens java.base/java.lang=ALL-UNNAMED \
+--add-opens java.base/java.io=ALL-UNNAMED \
+--add-opens java.base/java.util=ALL-UNNAMED \

Review Comment:
   hmmm... I don't need these with JDK17.
   
   @gnodet it would be so nice to get your hep here? :) 





Issue Time Tracking
---

Worklog Id: (was: 873598)
Time Spent: 4h 50m  (was: 4h 40m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 4h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873583&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873583
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 16:30
Start Date: 28/Jul/23 16:30
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4565:
URL: 
https://github.com/apache/activemq-artemis/pull/4565#issuecomment-1655973410

   Only thing left on my todo is the JDK parameters and testing with a newer 
version. will do it before the end of today.
   
   




Issue Time Tracking
---

Worklog Id: (was: 873583)
Time Spent: 4h 40m  (was: 4.5h)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 4h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873567&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873567
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 15:11
Start Date: 28/Jul/23 15:11
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4565:
URL: 
https://github.com/apache/activemq-artemis/pull/4565#issuecomment-1655863616

   for my future reference. I opened an issue and Pull Request on Pico: 
https://github.com/remkop/picocli/pull/2075
   
   the jshell auto completion is showing hidden values. the PR sent would fix 
it but I'm waiting for a best way to merge this upstream in Pico. hidden is the 
way to go to "deprecate" stuff. 




Issue Time Tracking
---

Worklog Id: (was: 873567)
Time Spent: 4.5h  (was: 4h 20m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 4.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873566&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873566
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 15:10
Start Date: 28/Jul/23 15:10
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277680335


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/DestAbstract.java:
##
@@ -21,29 +21,29 @@
 import javax.jms.JMSException;
 import javax.jms.Session;
 
-import com.github.rvesse.airline.annotations.Option;
 import org.apache.activemq.artemis.cli.factory.serialize.MessageSerializer;
 import org.apache.activemq.artemis.cli.factory.serialize.XMLMessageSerializer;
 import org.apache.activemq.artemis.jms.client.ActiveMQDestination;
+import picocli.CommandLine.Option;
 
 public class DestAbstract extends ConnectionAbstract {
 
-   @Option(name = "--destination", description = "Destination to be used. It 
can be prefixed with queue:// or topic:// and can be an FQQN in the form of 
::. Default: queue://TEST.")
+   @Option(names = "--destination", description = "Destination to be used. It 
can be prefixed with queue:// or topic:// and can be an FQQN in the form of 
::. Default: queue://TEST.")
String destination = "queue://TEST";
 
-   @Option(name = "--message-count", description = "Number of messages to act 
on. Default: 1000.")
+   @Option(names = "--message-count", description = "Number of messages to act 
on. Default: 1000.")
int messageCount = 1000;
 
-   @Option(name = "--sleep", description = "Time wait between each message.")
+   @Option(names = "--sleep", description = "Time wait between each message.")
int sleep = 0;
 
-   @Option(name = "--txt-size", description = "Transaction batch size.")
+   @Option(names = {"--txt-size", "--tx-batch-size"}, description = 
"Transaction batch size. (--txt-size is deprecated)")

Review Comment:
   I'm using hidden now...
   
   
   and I opened a PR and bug on pico to fix the auto-completion on the shell:
   
   https://github.com/remkop/picocli/pull/2075





Issue Time Tracking
---

Worklog Id: (was: 873566)
Time Spent: 4h 20m  (was: 4h 10m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 4h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873565&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873565
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 15:07
Start Date: 28/Jul/23 15:07
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277677177


##
artemis-distribution/src/main/resources/licenses/bin/LICENSE:
##
@@ -286,6 +286,12 @@ For HdrHistogram:
 This product bundles HdrHistogram, which is available under the
 "2-clause BSD" license. For details, see licences/LICENSE-hdrhistogram.txt.
 
+==
+For JLine:
+==
+This product bundles JLine, which is available under the
+"3-clause BSD" license. For details, see licences/LICENSE-jline.txt.

Review Comment:
   It was added here but apparently .txt is on the gitignore and I missed 
adding it. thank you.





Issue Time Tracking
---

Worklog Id: (was: 873565)
Time Spent: 4h 10m  (was: 4h)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873564&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873564
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 15:03
Start Date: 28/Jul/23 15:03
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277673400


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java:
##
@@ -87,9 +68,29 @@
  * Notice that this class should not use any logging as it's part of the 
bootstrap and using logging here could
  *disrupt the order of bootstrapping on certain components (e.g. JMX 
being started from log4j)
  */
-public class Artemis {
+@Command(name = "artemis", description = "ActiveMQ Artemis Command Line")
+public class Artemis implements Runnable {
+
+   CommandLine commandLine;
+
+   public CommandLine getCommandLine() {
+  return commandLine;
+   }
+
+   public Artemis setCommandLine(CommandLine commandLine) {
+  this.commandLine = commandLine;
+  return this;
+   }
+
+   @Override
+   public void run() {
+  // We are running the shell by default.
+  // if you type ./artemis we will go straight to the shell
+  Shell.runShell();
+   }
 
public static void main(String... args) throws Exception {
+  System.out.println("Line::" + getNameFromBanner());

Review Comment:
   yeah!! lol thank you





Issue Time Tracking
---

Worklog Id: (was: 873564)
Time Spent: 4h  (was: 3h 50m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 4h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873561&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873561
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 14:46
Start Date: 28/Jul/23 14:46
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277589970


##
artemis-distribution/src/main/resources/licenses/bin/LICENSE:
##
@@ -286,6 +286,12 @@ For HdrHistogram:
 This product bundles HdrHistogram, which is available under the
 "2-clause BSD" license. For details, see licences/LICENSE-hdrhistogram.txt.
 
+==
+For JLine:
+==
+This product bundles JLine, which is available under the
+"3-clause BSD" license. For details, see licences/LICENSE-jline.txt.

Review Comment:
   Referenced file still needs added.



##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java:
##
@@ -87,9 +68,29 @@
  * Notice that this class should not use any logging as it's part of the 
bootstrap and using logging here could
  *disrupt the order of bootstrapping on certain components (e.g. JMX 
being started from log4j)
  */
-public class Artemis {
+@Command(name = "artemis", description = "ActiveMQ Artemis Command Line")
+public class Artemis implements Runnable {
+
+   CommandLine commandLine;
+
+   public CommandLine getCommandLine() {
+  return commandLine;
+   }
+
+   public Artemis setCommandLine(CommandLine commandLine) {
+  this.commandLine = commandLine;
+  return this;
+   }
+
+   @Override
+   public void run() {
+  // We are running the shell by default.
+  // if you type ./artemis we will go straight to the shell
+  Shell.runShell();
+   }
 
public static void main(String... args) throws Exception {
+  System.out.println("Line::" + getNameFromBanner());

Review Comment:
   Is this a leftover?



##
docs/user-manual/en/using-server.md:
##
@@ -53,6 +53,8 @@ The following highlights some important folders on the 
distribution:
 
 ## Creating a Broker Instance
 
+Before the broker is used, an broker *instance* must be created.

Review Comment:
   an -> a
   
   I would put the sentence at the start of the existing paragraph below about 
broker instances.





Issue Time Tracking
---

Worklog Id: (was: 873561)
Time Spent: 3h 50m  (was: 3h 40m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873525&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873525
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 11:54
Start Date: 28/Jul/23 11:54
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277454004


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/ActionAbstract.java:
##
@@ -205,6 +205,20 @@ the ARTEMIS_HOME variable will include back slashes (An 
invalid file URI charact
   return brokerHome;
}
 
+   @Override
+   public void run() {
+  try {
+ execute(getActionContext());
+  } catch (Throwable e) {
+ e.printStackTrace();

Review Comment:
   the Shell will only call the Runnable. So this to interface back to the 
execute method.





Issue Time Tracking
---

Worklog Id: (was: 873525)
Time Spent: 3h 40m  (was: 3.5h)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 3h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873524&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873524
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 11:53
Start Date: 28/Jul/23 11:53
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277452609


##
docs/user-manual/en/using-server.md:
##
@@ -50,6 +50,30 @@ The following highlights some important folders on the 
distribution:
 
 - `user-manual` - The user manual is placed under the web folder.
 
+## Artemis Shell
+
+You can activate the artemis shell by typing:
+
+```shell
+./artemis shell
+```
+
+This will start a JLine3 terminal with auto-completion:

Review Comment:
   I removed the line.. and I'm adding a chapter for the CLI.





Issue Time Tracking
---

Worklog Id: (was: 873524)
Time Spent: 3.5h  (was: 3h 20m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873520&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873520
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 11:47
Start Date: 28/Jul/23 11:47
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277446167


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java:
##
@@ -159,11 +176,19 @@ private ConnectionFactory 
createAMQPConnectionFactory(String brokerURL,
   try {
  Connection connection = cf.createConnection();
  connection.close();
+ connectionSucces(brokerURL, user, password);

Review Comment:
   the connection is already called on line 177





Issue Time Tracking
---

Worklog Id: (was: 873520)
Time Spent: 3h 10m  (was: 3h)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873522&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873522
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 11:47
Start Date: 28/Jul/23 11:47
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277446167


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java:
##
@@ -159,11 +176,19 @@ private ConnectionFactory 
createAMQPConnectionFactory(String brokerURL,
   try {
  Connection connection = cf.createConnection();
  connection.close();
+ connectionSucces(brokerURL, user, password);

Review Comment:
   the connection is already called on line 177





Issue Time Tracking
---

Worklog Id: (was: 873522)
Time Spent: 3h 20m  (was: 3h 10m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873507&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873507
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 10:38
Start Date: 28/Jul/23 10:38
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on PR #4565:
URL: 
https://github.com/apache/activemq-artemis/pull/4565#issuecomment-1655465910

   > I have added one more review from myself. When using user/password the 
system would ask me for the user/password all the time. I'm now saving the last 
successful user/password between executions, adding a connect and disconnect 
that's only available through the shell (what makes the shell more useful since 
it won't ask for user/password every time when using security)
   
   I think the ability to set and clear the URI + credentials used for 
subsequent commands in the shell is good. I'm less clear on it doing it 
silently in the background based on every previous command.
   
   At least one of the additions you made was around it handling the URIs 
crossing between the different clients, presumably as the URI is saved but the 
protocol value is not, probably how you hit that, the client used will change 
between commands in some cases, whilst the URI + credentials etc do not even 
though the URIs are client-specific.




Issue Time Tracking
---

Worklog Id: (was: 873507)
Time Spent: 3h  (was: 2h 50m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 3h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873502&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873502
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 10:25
Start Date: 28/Jul/23 10:25
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277379207


##
docs/user-manual/en/using-server.md:
##
@@ -50,6 +50,30 @@ The following highlights some important folders on the 
distribution:
 
 - `user-manual` - The user manual is placed under the web folder.
 
+## Artemis Shell
+
+You can activate the artemis shell by typing:
+
+```shell
+./artemis shell
+```
+
+This will start a JLine3 terminal with auto-completion:

Review Comment:
   unresolved as the docs didnt seem to change





Issue Time Tracking
---

Worklog Id: (was: 873502)
Time Spent: 2h 50m  (was: 2h 40m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873501&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873501
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 10:24
Start Date: 28/Jul/23 10:24
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1277341990


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java:
##
@@ -172,6 +197,13 @@ private ConnectionFactory 
createAMQPConnectionFactory(String brokerURL,
  // if a connection exception will ask for the URL, user and password
  getActionContext().err.println("Connection failed::" + 
e.getMessage());
  cf = new JmsConnectionFactory(inputUser(user), 
inputPassword(password), inputBrokerURL(brokerURL));
+ try {
+Connection connection = cf.createConnection();
+connection.close();
+connectionSucces(brokerURL, user, password);

Review Comment:
   Use tryConnect() like done elsewhere?



##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/DestAbstract.java:
##
@@ -21,29 +21,29 @@
 import javax.jms.JMSException;
 import javax.jms.Session;
 
-import com.github.rvesse.airline.annotations.Option;
 import org.apache.activemq.artemis.cli.factory.serialize.MessageSerializer;
 import org.apache.activemq.artemis.cli.factory.serialize.XMLMessageSerializer;
 import org.apache.activemq.artemis.jms.client.ActiveMQDestination;
+import picocli.CommandLine.Option;
 
 public class DestAbstract extends ConnectionAbstract {
 
-   @Option(name = "--destination", description = "Destination to be used. It 
can be prefixed with queue:// or topic:// and can be an FQQN in the form of 
::. Default: queue://TEST.")
+   @Option(names = "--destination", description = "Destination to be used. It 
can be prefixed with queue:// or topic:// and can be an FQQN in the form of 
::. Default: queue://TEST.")
String destination = "queue://TEST";
 
-   @Option(name = "--message-count", description = "Number of messages to act 
on. Default: 1000.")
+   @Option(names = "--message-count", description = "Number of messages to act 
on. Default: 1000.")
int messageCount = 1000;
 
-   @Option(name = "--sleep", description = "Time wait between each message.")
+   @Option(names = "--sleep", description = "Time wait between each message.")
int sleep = 0;
 
-   @Option(name = "--txt-size", description = "Transaction batch size.")
+   @Option(names = {"--txt-size", "--tx-batch-size"}, description = 
"Transaction batch size. (--txt-size is deprecated)")

Review Comment:
   The non-deprecated option name being first would read better (unless the cli 
is reverse-ordering the options)



##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java:
##
@@ -194,62 +189,111 @@ public static Object execute(boolean inputEnabled, 
boolean useSystemOut, File ar
 * Useful on test cases
 */
private static Object internalExecute(File artemisHome, File 
artemisInstance, File etcFolder, String[] args) throws Exception {
-  return internalExecute(artemisHome, artemisInstance, etcFolder, args, 
ActionContext.system());
+  return internalExecute(artemisHome, artemisInstance, etcFolder, args, 
new ActionContext());
}
 
public static Object internalExecute(File artemisHome, File 
artemisInstance, File etcFolder, String[] args, ActionContext context) throws 
Exception {
-  Action action = builder(artemisInstance).build().parse(args);
-  action.setHomeValues(artemisHome, artemisInstance, etcFolder);
+  boolean isInstance = artemisInstance != null || 
System.getProperty("artemis.instance") != null;
+  CommandLine commandLine = buildCommand(isInstance, !isInstance);
+
+  Object userObject = parseAction(commandLine, args);
+  if (userObject instanceof Action) {

Review Comment:
   Maybe add an Objects.requireNonNull() here...or otherwise cover potential 
for NPE when throwing the new IAE below.



##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java:
##
@@ -180,28 +212,62 @@ private ConnectionFactory 
createAMQPConnectionFactory(String brokerURL,
}
 
protected ActiveMQConnectionFactory createCoreConnectionFactory() {
+  recoverSuccessPassword();
   return createCoreConnectionFactory(brokerURL, user, password, clientID);
}
 
+   private void recoverSuccessPassword() {
+  if (CONNECTION_SUCCESS.get() != null) {
+ ConnectionSuccess success = CONNECTION_SUCCESS.get();
+ if (this.user == null) {
+this.user  = success.user;
+ }
+ if (this.password == null)

[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873435&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873435
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 00:31
Start Date: 28/Jul/23 00:31
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4565:
URL: 
https://github.com/apache/activemq-artemis/pull/4565#issuecomment-1654801169

   I will finish the other 2 items tomorrow. there's one item I didn't close 
(resolve) from our conversation here because I'm not sure it's the best choice 
yet.. will look at it again tomorrow.




Issue Time Tracking
---

Worklog Id: (was: 873435)
Time Spent: 2.5h  (was: 2h 20m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873434&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873434
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 00:31
Start Date: 28/Jul/23 00:31
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4565:
URL: 
https://github.com/apache/activemq-artemis/pull/4565#issuecomment-1654800574

   I have added one more review from myself. When using user/password the 
system would ask me for the user/password all the time. I'm now saving the last 
successful user/password between executions, adding a connect and disconnect 
that's only available through the shell (what makes the shell more useful since 
it won't ask for user/password every time when using security)




Issue Time Tracking
---

Worklog Id: (was: 873434)
Time Spent: 2h 20m  (was: 2h 10m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873433&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873433
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 28/Jul/23 00:30
Start Date: 28/Jul/23 00:30
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276957650


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/UserGroup.java:
##
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.cli.commands.user;
+
+import org.apache.activemq.artemis.cli.commands.HelpAction;
+import picocli.CommandLine;
+
+@CommandLine.Command(name = "user", description = "file-based user management 
(example ./artemis user list)", subcommands = {ListUser.class, AddUser.class, 
RemoveUser.class, ResetUser.class})

Review Comment:
   I think I have solved this..
   
   @gemmellr  but I will let you decide if this one could be resolved or not





Issue Time Tracking
---

Worklog Id: (was: 873433)
Time Spent: 2h 10m  (was: 2h)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873416&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873416
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 20:27
Start Date: 27/Jul/23 20:27
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276787067


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/UserGroup.java:
##
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.cli.commands.user;
+
+import org.apache.activemq.artemis.cli.commands.HelpAction;
+import picocli.CommandLine;
+
+@CommandLine.Command(name = "user", description = "file-based user management 
(example ./artemis user list)", subcommands = {ListUser.class, AddUser.class, 
RemoveUser.class, ResetUser.class})

Review Comment:
   My options here are limited. I could create a different DataGroup for 
ShellDataGroup, or I can make a more generic text.
   
   The other option would be some horrible hacking into the internal API.. 
which would be even worse. So I will go for the more generic text.





Issue Time Tracking
---

Worklog Id: (was: 873416)
Time Spent: 2h  (was: 1h 50m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873401&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873401
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 18:24
Start Date: 27/Jul/23 18:24
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276667532


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/UserGroup.java:
##
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.cli.commands.user;
+
+import org.apache.activemq.artemis.cli.commands.HelpAction;
+import picocli.CommandLine;
+
+@CommandLine.Command(name = "user", description = "file-based user management 
(example ./artemis user list)", subcommands = {ListUser.class, AddUser.class, 
RemoveUser.class, ResetUser.class})

Review Comment:
   I think I can specify the description on the API and use the isShell that I 
implemented. will take a look.





Issue Time Tracking
---

Worklog Id: (was: 873401)
Time Spent: 1h 50m  (was: 1h 40m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873379&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873379
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 16:54
Start Date: 27/Jul/23 16:54
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276568011


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/user/UserGroup.java:
##
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.cli.commands.user;
+
+import org.apache.activemq.artemis.cli.commands.HelpAction;
+import picocli.CommandLine;
+
+@CommandLine.Command(name = "user", description = "file-based user management 
(example ./artemis user list)", subcommands = {ListUser.class, AddUser.class, 
RemoveUser.class, ResetUser.class})

Review Comment:
   These group examples like "(example ./artemis user list)" show up in the 
shell help output, where it is actually _not_ what should be done. Not sure if 
it could cater to shell vs not-shell usage mode, but might be nice if it was 
possible.





Issue Time Tracking
---

Worklog Id: (was: 873379)
Time Spent: 1h 40m  (was: 1.5h)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873377&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873377
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 16:45
Start Date: 27/Jul/23 16:45
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276559089


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java:
##
@@ -36,11 +34,12 @@
 import org.apache.activemq.artemis.nativo.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.nativo.jlibaio.LibaioFile;
 import org.apache.activemq.artemis.utils.FileUtil;
+import picocli.CommandLine;
 
 /**
  * CLI action that creates a broker instance directory.
  */
-@Command(name = "create", description = "Create a new broker instance.")
+@CommandLine.Command(name = "create", description = "Create a new broker 
instance.")

Review Comment:
   Dont think it should need to be static, its just a nested interface/class, 
regular import of the full name should work.





Issue Time Tracking
---

Worklog Id: (was: 873377)
Time Spent: 1.5h  (was: 1h 20m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873372&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873372
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 16:29
Start Date: 27/Jul/23 16:29
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276538252


##
docs/user-manual/en/using-server.md:
##
@@ -50,6 +50,30 @@ The following highlights some important folders on the 
distribution:
 
 - `user-manual` - The user manual is placed under the web folder.
 
+## Artemis Shell
+
+You can activate the artemis shell by typing:
+
+```shell
+./artemis shell
+```
+
+This will start a JLine3 terminal with auto-completion:

Review Comment:
   A note on how to exit the shell may also be in order, some people wont 
actually know.





Issue Time Tracking
---

Worklog Id: (was: 873372)
Time Spent: 1h 20m  (was: 1h 10m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873369&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873369
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 16:21
Start Date: 27/Jul/23 16:21
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276528603


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java:
##
@@ -36,11 +34,12 @@
 import org.apache.activemq.artemis.nativo.jlibaio.LibaioContext;
 import org.apache.activemq.artemis.nativo.jlibaio.LibaioFile;
 import org.apache.activemq.artemis.utils.FileUtil;
+import picocli.CommandLine;
 
 /**
  * CLI action that creates a broker instance directory.
  */
-@Command(name = "create", description = "Create a new broker instance.")
+@CommandLine.Command(name = "create", description = "Create a new broker 
instance.")

Review Comment:
   we could use import static.. which I don't like much.
   
   But I can make an exception here 
   





Issue Time Tracking
---

Worklog Id: (was: 873369)
Time Spent: 1h 10m  (was: 1h)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873368&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873368
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 16:17
Start Date: 27/Jul/23 16:17
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276523807


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/Artemis.java:
##
@@ -194,62 +186,102 @@ public static Object execute(boolean inputEnabled, 
boolean useSystemOut, File ar
 * Useful on test cases
 */
private static Object internalExecute(File artemisHome, File 
artemisInstance, File etcFolder, String[] args) throws Exception {
-  return internalExecute(artemisHome, artemisInstance, etcFolder, args, 
ActionContext.system());
+  return internalExecute(artemisHome, artemisInstance, etcFolder, args, 
new ActionContext());
}
 
public static Object internalExecute(File artemisHome, File 
artemisInstance, File etcFolder, String[] args, ActionContext context) throws 
Exception {
-  Action action = builder(artemisInstance).build().parse(args);
-  action.setHomeValues(artemisHome, artemisInstance, etcFolder);
+  boolean isInstance = artemisInstance != null || 
System.getProperty("artemis.instance") != null;
+  CommandLine commandLine = buildCommand(isInstance, !isInstance);
+
+  Object userObject = parseAction(commandLine, args);
+  if (userObject instanceof Action) {
+ Action action = (Action) userObject;
+ action.setHomeValues(artemisHome, artemisInstance, etcFolder);
+ if (action.isVerbose()) {
+context.out.print("Executing " + action.getClass().getName() + " 
");
+for (String arg : args) {
+   context.out.print(arg + " ");
+}
+context.out.println();
+context.out.println("Home::" + action.getBrokerHome() + ", 
Instance::" + action.getBrokerInstance());
+ }
 
-  if (action.isVerbose()) {
- context.out.print("Executing " + action.getClass().getName() + " ");
- for (String arg : args) {
-context.out.print(arg + " ");
+ return action.execute(context);
+  } else {
+ if (userObject instanceof Runnable) {
+((Runnable) userObject).run();
+ }

Review Comment:
   we shouldn't really add anything to do the CommandLine that's not a Runnable 
or an Action. But I will add a check.
   
   That should prevent future devs from making a mistake.





Issue Time Tracking
---

Worklog Id: (was: 873368)
Time Spent: 1h  (was: 50m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873366&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873366
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 16:11
Start Date: 27/Jul/23 16:11
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276299266


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Upgrade.java:
##
@@ -106,8 +106,16 @@ public Object run(ActionContext context) throws Exception {
  throw new IOException(etcFolder + " does not exist for etc");
   }
 
+  StringBuffer javaOption = new StringBuffer();

Review Comment:
   StringBuilder?
   
   Name could be more obvious than the singular of the original plural list, 
e.g javaOptionsArgs...or javaOptionsString (and build the value here rather 
than later at the point it is passed, throw away the builder).





Issue Time Tracking
---

Worklog Id: (was: 873366)
Time Spent: 50m  (was: 40m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873365&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873365
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 16:10
Start Date: 27/Jul/23 16:10
Worklog Time Spent: 10m 
  Work Description: gemmellr commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1276148633


##
pom.xml:
##
@@ -586,17 +587,23 @@
  Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-27 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=873310&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-873310
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 27/Jul/23 11:39
Start Date: 27/Jul/23 11:39
Worklog Time Spent: 10m 
  Work Description: clebertsuconic commented on PR #4565:
URL: 
https://github.com/apache/activemq-artemis/pull/4565#issuecomment-1653444177

   
   
https://github.com/apache/activemq-artemis/assets/750514/2e094597-8172-44e6-9965-e88766c396e2
   
   




Issue Time Tracking
---

Worklog Id: (was: 873310)
Time Spent: 0.5h  (was: 20m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=872645&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-872645
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 24/Jul/23 17:58
Start Date: 24/Jul/23 17:58
Worklog Time Spent: 10m 
  Work Description: jbertram commented on code in PR #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565#discussion_r1272579649


##
artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AutoCompletion.java:
##
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.activemq.artemis.cli.commands;
+
+import java.io.File;
+
+import picocli.AutoComplete;
+import picocli.CommandLine;
+
+@CommandLine.Command(name = "auto-complete", description = "Generates the auto 
complete helper file")
+public class AutoCompletion implements Runnable {
+
+   public AutoCompletion(CommandLine parent) {
+  this.parent = parent;
+   }
+
+   CommandLine parent;
+
+   @CommandLine.Parameters (description = "The script that will be used to 
invoke check-leak")

Review Comment:
   Reference to "check-leak" here seems wrong.





Issue Time Tracking
---

Worklog Id: (was: 872645)
Time Spent: 20m  (was: 10m)

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (ARTEMIS-4372) Move CLI framework to picocli and implement auto-complete

2023-07-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4372?focusedWorklogId=872629&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-872629
 ]

ASF GitHub Bot logged work on ARTEMIS-4372:
---

Author: ASF GitHub Bot
Created on: 24/Jul/23 17:42
Start Date: 24/Jul/23 17:42
Worklog Time Spent: 10m 
  Work Description: clebertsuconic opened a new pull request, #4565:
URL: https://github.com/apache/activemq-artemis/pull/4565

   (no comment)




Issue Time Tracking
---

Worklog Id: (was: 872629)
Remaining Estimate: 0h
Time Spent: 10m

> Move CLI framework to picocli and implement auto-complete
> -
>
> Key: ARTEMIS-4372
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4372
> Project: ActiveMQ Artemis
>  Issue Type: New Feature
>Reporter: Clebert Suconic
>Assignee: Clebert Suconic
>Priority: Major
> Fix For: 2.31.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)