displayHelp(args);
}
@Override
protected void displayHelp(String[] args) {
PrintHelper printHelper = new PrintHelper(System.out);
PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out), true);
out.println();
if(args.length > 0) {
CommandMetaData commandLine = getCommandMetaData(args[0]);
if(commandLine != null) {
out.println("Help for command: "+commandLine.getCommandName());
out.println(" "+hangingIndent(commandLine.getCommandName()+" "+commandLine.getHelpArgumentList(), 4));
out.println();
out.print(PrintHelper.reformat(commandLine.getHelpText(), 8, 72));
out.println();
return;
} else if(args[0].equals("options")) {
out.println("Help on general options:");
printHelper.printOptions(out, options);
out.println();
return;
} else if(args[0].equals("all")) {
out.println();
out.println("All commands");
out.println();
for (CommandMetaData commandLine2 : commandMetaData) {
out.println(" "+hangingIndent(commandLine2.getCommandName()+" "+commandLine2.getHelpArgumentList(), 4));
out.print(PrintHelper.reformat(commandLine2.getHelpText(), 8, 72));
out.println();
}
out.println();
return;
}
}
out.println("usage: java -jar bin/deployer.jar [general options] command [command options]");
out.println();
out.println("The general options are:");
printHelper.printOptionsNoDesc(out, options);
out.println();
out.println("The available commands are:");
renderCommandList(out);
out.println();
out.println("For more information about a specific command, run");