diff --git a/src/main/java/org/parisjug/eventpublisher/EventPublisher.java b/src/main/java/org/parisjug/eventpublisher/EventPublisher.java index 73c61b8..6a46cca 100644 --- a/src/main/java/org/parisjug/eventpublisher/EventPublisher.java +++ b/src/main/java/org/parisjug/eventpublisher/EventPublisher.java @@ -5,6 +5,8 @@ import io.quarkus.picocli.runtime.annotations.TopCommand; import picocli.CommandLine; +import picocli.CommandLine.Spec; +import picocli.CommandLine.Model.CommandSpec; @TopCommand @CommandLine.Command(subcommands = { // @@ -12,8 +14,11 @@ CreateMailCampaignCommand.class // }) public class EventPublisher implements Runnable { + @Spec + CommandSpec spec; + @Override public void run() { - System.out.println("hello "); + throw new CommandLine.ParameterException(spec.commandLine(), "No command argument specified. Please provide a command argument."); } }