use of se.softhouse.jargo.ArgumentException in project exist by eXist-db.
the class ExportMain method main.
@SuppressWarnings("unchecked")
public static void main(final String[] args) {
try {
CompatibleJavaVersionCheck.checkForCompatibleJavaVersion();
final ParsedArguments arguments = CommandLineParser.withArguments(noCheckArg, checkDocsArg, directAccessArg, exportArg, noExportArg, incrementalArg, zipArg, noZipArg).andArguments(configArg, outputDirArg).andArguments(helpArg, verboseArg).parse(args);
process(arguments);
} catch (final StartException e) {
if (e.getMessage() != null && !e.getMessage().isEmpty()) {
System.err.println(e.getMessage());
}
System.exit(e.getErrorCode());
} catch (final ArgumentException e) {
System.out.println(e.getMessageAndUsage());
System.exit(SystemExitCodes.INVALID_ARGUMENT_EXIT_CODE);
}
}
use of se.softhouse.jargo.ArgumentException in project exist by eXist-db.
the class JMXClient method main.
@SuppressWarnings("unchecked")
public static void main(final String[] args) {
try {
CompatibleJavaVersionCheck.checkForCompatibleJavaVersion();
final ParsedArguments arguments = CommandLineParser.withArguments(addressArg, portArg, instanceArg, waitArg).andArguments(cacheDisplayArg, locksDisplayArg).andArguments(dbInfoArg, memoryInfoArg, sanityCheckInfoArg, jobsInfoArg).andArguments(helpArg).parse(args);
process(arguments);
} catch (final StartException e) {
if (e.getMessage() != null && !e.getMessage().isEmpty()) {
System.err.println(e.getMessage());
}
System.exit(e.getErrorCode());
} catch (final ArgumentException e) {
System.out.println(e.getMessageAndUsage());
System.exit(SystemExitCodes.INVALID_ARGUMENT_EXIT_CODE);
}
}
use of se.softhouse.jargo.ArgumentException in project exist by eXist-db.
the class ServerShutdown method main.
@SuppressWarnings("unchecked")
public static void main(final String[] args) {
try {
CompatibleJavaVersionCheck.checkForCompatibleJavaVersion();
final ParsedArguments arguments = CommandLineParser.withArguments(userArg, passwordArg, uriArg).andArguments(helpArg).parse(args);
process(arguments);
} catch (final StartException e) {
if (e.getMessage() != null && !e.getMessage().isEmpty()) {
System.err.println(e.getMessage());
}
System.exit(e.getErrorCode());
} catch (final ArgumentException e) {
System.out.println(e.getMessageAndUsage());
System.exit(SystemExitCodes.INVALID_ARGUMENT_EXIT_CODE);
}
}
use of se.softhouse.jargo.ArgumentException in project exist by eXist-db.
the class BlobStoreDumpTool method main.
public static void main(final String[] args) throws IOException {
try {
CompatibleJavaVersionCheck.checkForCompatibleJavaVersion();
final ParsedArguments arguments = CommandLineParser.withArguments(digestArg, persistentFileArg).andArguments(helpArg).parse(args);
final DigestType digestType = arguments.get(digestArg);
final Path persistentFile = arguments.get(persistentFileArg);
final PrintStream printStream = System.out;
dump(digestType, persistentFile, printStream);
} catch (final StartException e) {
if (e.getMessage() != null && !e.getMessage().isEmpty()) {
System.err.println(e.getMessage());
}
System.exit(e.getErrorCode());
} catch (final ArgumentException e) {
System.out.println(e.getMessageAndUsage());
System.exit(SystemExitCodes.INVALID_ARGUMENT_EXIT_CODE);
}
}
Aggregations