use of org.kohsuke.args4j.CmdLineException in project ORCID-Source by ORCID.
the class IndexProfiles method main.
public static void main(String[] args) throws IOException {
IndexProfiles indexProfiles = new IndexProfiles();
CmdLineParser parser = new CmdLineParser(indexProfiles);
try {
parser.parseArgument(args);
indexProfiles.validateArgs(parser);
indexProfiles.init();
indexProfiles.execute();
} catch (CmdLineException e) {
System.err.println(e.getMessage());
parser.printUsage(System.err);
System.exit(1);
} catch (Throwable t) {
System.err.println(t);
System.exit(2);
}
System.exit(0);
}
use of org.kohsuke.args4j.CmdLineException in project ORCID-Source by ORCID.
the class AddScopesToExistingClients method main.
public static void main(String[] args) {
AddScopesToExistingClients addScopesToExistingClients = new AddScopesToExistingClients();
CmdLineParser parser = new CmdLineParser(addScopesToExistingClients);
try {
parser.parseArgument(args);
addScopesToExistingClients.validateParameters(parser);
addScopesToExistingClients.init();
addScopesToExistingClients.process();
System.out.println();
System.out.println();
System.out.println(addScopesToExistingClients.getClientsUpdated() + " clients were updated");
System.out.println();
System.out.println();
} catch (CmdLineException e) {
System.err.println(e.getMessage());
parser.printUsage(System.err);
System.exit(1);
}
System.exit(0);
}
use of org.kohsuke.args4j.CmdLineException in project ORCID-Source by ORCID.
the class DeleteOrcidByIdentifier method main.
public static void main(String[] args) {
DeleteOrcidByIdentifier deleteOrcidByIdentifier = new DeleteOrcidByIdentifier();
CmdLineParser parser = new CmdLineParser(deleteOrcidByIdentifier);
try {
parser.parseArgument(args);
deleteOrcidByIdentifier.validateArgs(parser);
deleteOrcidByIdentifier.execute();
} catch (CmdLineException e) {
System.err.println(e.getMessage());
parser.printUsage(System.err);
}
}
use of org.kohsuke.args4j.CmdLineException in project ORCID-Source by ORCID.
the class CreateNewClientSecrets method main.
public static void main(String[] args) {
CreateNewClientSecrets createNewClientSecrets = new CreateNewClientSecrets();
CmdLineParser parser = new CmdLineParser(createNewClientSecrets);
try {
parser.parseArgument(args);
createNewClientSecrets.validateArgs(parser);
createNewClientSecrets.execute();
} catch (CmdLineException e) {
System.err.println(e.getMessage());
parser.printUsage(System.err);
} finally {
System.exit(0);
}
}
use of org.kohsuke.args4j.CmdLineException in project ORCID-Source by ORCID.
the class DeleteWorkByIdentifier method main.
public static void main(String[] args) {
DeleteWorkByIdentifier deleteWorkByIdentifier = new DeleteWorkByIdentifier();
CmdLineParser parser = new CmdLineParser(deleteWorkByIdentifier);
try {
parser.parseArgument(args);
deleteWorkByIdentifier.validateArgs(parser);
deleteWorkByIdentifier.execute();
} catch (CmdLineException e) {
System.err.println(e.getMessage());
parser.printUsage(System.err);
}
}
Aggregations