Skip to content

Commit

Permalink
Fix broken QuarkusCli
Browse files Browse the repository at this point in the history
  • Loading branch information
ia3andy committed Jun 8, 2020
1 parent d9e91f2 commit f66526f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
8 changes: 4 additions & 4 deletions devtools/aesh/src/main/java/io/quarkus/cli/QuarkusCli.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
import org.aesh.command.validator.CommandValidatorException;
import org.aesh.command.validator.OptionValidatorException;

import io.quarkus.devtools.commands.handlers.QuarkusCommandHandler;
import io.quarkus.cli.commands.QuarkusCommand;

public class QuarkusCli {

public static void main(String[] args) throws CommandRegistryException {
CommandRuntime runtime = AeshCommandRuntimeBuilder
.builder()
.commandRegistry(AeshCommandRegistryBuilder.builder().command(QuarkusCommandHandler.class).create())
.commandRegistry(AeshCommandRegistryBuilder.builder().command(QuarkusCommand.class).create())
.build();

if (args.length > 0) {
StringBuilder sb = new StringBuilder(QuarkusCommandHandler.COMMAND_NAME).append(" ");
StringBuilder sb = new StringBuilder(QuarkusCommand.COMMAND_NAME).append(" ");
if (args.length == 1) {
sb.append(args[0]);
} else {
Expand Down Expand Up @@ -54,6 +54,6 @@ private static void showHelpIfNeeded(CommandRuntime runtime, Exception e) {
if (e != null) {
System.err.println(e.getMessage());
}
System.err.println(runtime.commandInfo(QuarkusCommandHandler.COMMAND_NAME));
System.err.println(runtime.commandInfo(QuarkusCommand.COMMAND_NAME));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import java.util.Collections;
import java.util.List;

import io.quarkus.devtools.commands.AddExtensions;
import io.quarkus.devtools.commands.data.QuarkusCommandOutcome;
import org.aesh.command.Command;
import org.aesh.command.CommandDefinition;
import org.aesh.command.CommandException;
Expand All @@ -17,6 +15,8 @@
import org.aesh.io.Resource;

import io.quarkus.dependencies.Extension;
import io.quarkus.devtools.commands.AddExtensions;
import io.quarkus.devtools.commands.data.QuarkusCommandOutcome;
import io.quarkus.devtools.project.QuarkusProject;
import io.quarkus.platform.descriptor.QuarkusPlatformDescriptor;
import io.quarkus.platform.tools.config.QuarkusPlatformConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import java.nio.file.Paths;
import java.util.HashMap;

import io.quarkus.devtools.commands.CreateProject;
import org.aesh.command.Command;
import org.aesh.command.CommandDefinition;
import org.aesh.command.CommandResult;
import org.aesh.command.invocation.CommandInvocation;
import org.aesh.command.option.Option;
import org.aesh.io.Resource;

import io.quarkus.devtools.commands.CreateProject;
import io.quarkus.platform.tools.config.QuarkusPlatformConfig;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.nio.file.Paths;

import io.quarkus.devtools.commands.ListExtensions;
import org.aesh.command.Command;
import org.aesh.command.CommandDefinition;
import org.aesh.command.CommandException;
Expand All @@ -12,6 +11,7 @@
import org.aesh.command.option.Option;
import org.aesh.io.Resource;

import io.quarkus.devtools.commands.ListExtensions;
import io.quarkus.devtools.project.QuarkusProject;
import io.quarkus.platform.tools.config.QuarkusPlatformConfig;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.quarkus.cli.commands;

import io.quarkus.devtools.commands.handlers.QuarkusCommandHandler;
import org.aesh.command.Command;
import org.aesh.command.CommandException;
import org.aesh.command.CommandResult;
Expand All @@ -11,7 +10,7 @@
/**
* @author <a href="mailto:[email protected]">Ståle Pedersen</a>
*/
@GroupCommandDefinition(name = QuarkusCommandHandler.COMMAND_NAME, groupCommands = { ListExtensionsCommand.class,
@GroupCommandDefinition(name = QuarkusCommand.COMMAND_NAME, groupCommands = { ListExtensionsCommand.class,
AddExtensionCommand.class,
CreateProjectCommand.class }, description = "<command> [<args>] \n\nThese are the common quarkus commands used in various situations")
public class QuarkusCommand implements Command<CommandInvocation> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import java.util.Collections;
import java.util.List;

import io.quarkus.devtools.commands.data.QuarkusCommandOutcome;
import io.quarkus.devtools.commands.RemoveExtensions;
import org.aesh.command.Command;
import org.aesh.command.CommandDefinition;
import org.aesh.command.CommandException;
Expand All @@ -17,6 +15,8 @@
import org.aesh.io.Resource;

import io.quarkus.dependencies.Extension;
import io.quarkus.devtools.commands.RemoveExtensions;
import io.quarkus.devtools.commands.data.QuarkusCommandOutcome;
import io.quarkus.devtools.project.QuarkusProject;
import io.quarkus.platform.descriptor.QuarkusPlatformDescriptor;
import io.quarkus.platform.tools.config.QuarkusPlatformConfig;
Expand Down

0 comments on commit f66526f

Please sign in to comment.