Add arg names.
-
package com.quorum.tessera.config.cli;
import com.quorum.tessera.config.Config;
@@ -36,7 +35,6 @@ import org.apache.commons.cli.ParseException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
public class DefaultCliAdapter implements CliAdapter {
private static final Logger LOGGER = LoggerFactory.getLogger(DefaultCliAdapter.class);
@@ -81,8 +79,6 @@ public class DefaultCliAdapter implements CliAdapter {
.argName("PATH")
.build());
-
-
Map<String, Class> overrideOptions = OverrideUtil.buildConfigOptions();
overrideOptions.entrySet().forEach(entry -> {
@@ -98,20 +94,16 @@ public class DefaultCliAdapter implements CliAdapter {
.desc(String.format("Override option for %s , type: %s", optionName, optionType.getSimpleName()));
if (isCollection) {
- optionBuilder.hasArgs();
+ optionBuilder.hasArgs()
+ .argName(optionType.getSimpleName().toUpperCase() +"...");
} else {
- optionBuilder.hasArg();
+ optionBuilder.hasArg()
+ .argName(optionType.getSimpleName().toUpperCase());
}
options.addOption(optionBuilder.build());
});
-
-
-
-
-
-
if (Arrays.asList(args).contains("help")) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp("tessera -configfile <PATH> [-keygen <PATH>] [-pidfile <PATH>]", options);
@@ -225,5 +217,4 @@ public class DefaultCliAdapter implements CliAdapter {
}
}
-
}
