diff --git a/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/CommonsCliEncryptOptions.java b/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/CommonsCliEncryptOptions.java index 7ec71cb787..c21e3dce95 100644 --- a/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/CommonsCliEncryptOptions.java +++ b/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/CommonsCliEncryptOptions.java @@ -23,11 +23,13 @@ import java.util.List; import java.util.ListIterator; import java.util.Map; import java.util.Optional; +import java.util.function.Consumer; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.Option; import org.apache.commons.cli.ParseException; import org.apache.maven.api.cli.Options; +import org.apache.maven.api.cli.ParserRequest; import org.apache.maven.api.cli.mvnenc.EncryptOptions; import org.apache.maven.cling.invoker.CommonsCliOptions; import org.codehaus.plexus.interpolation.BasicInterpolator; @@ -103,6 +105,19 @@ public class CommonsCliEncryptOptions extends CommonsCliOptions implements Encry return interpolate(this, properties); } + @Override + public void displayHelp(ParserRequest request, Consumer printStream) { + super.displayHelp(request, printStream); + printStream.accept(""); + // we have no DI here (to discover) + printStream.accept("Goals:"); + printStream.accept(" diag - display encryption configuration diagnostic"); + printStream.accept(" init - wizard to configure encryption (interactive only)"); + printStream.accept(" encrypt - encrypts input"); + printStream.accept(" decrypt - decrypts encrypted input"); + printStream.accept(""); + } + protected static class CLIManager extends CommonsCliOptions.CLIManager { public static final String FORCE = "f"; public static final String YES = "y"; @@ -119,10 +134,5 @@ public class CommonsCliEncryptOptions extends CommonsCliOptions implements Encry .desc("Should imply user answered \"yes\" to all incoming questions?") .build()); } - - @Override - protected String commandLineSyntax(String command) { - return command + " [options] [goal]"; - } } }