Java Code Examples for com.martiansoftware.jsap.FlaggedOption#setLongFlag()
The following examples show how to use
com.martiansoftware.jsap.FlaggedOption#setLongFlag() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BranchLauncher.java From repairnator with MIT License | 6 votes |
public static JSAP defineBasicArgs() throws JSAPException { JSAP jsap = new JSAP(); FlaggedOption opt2 = new FlaggedOption("launcherMode"); opt2.setShortFlag('l'); opt2.setLongFlag("launcherMode"); opt2.setStringParser(JSAP.STRING_PARSER); opt2.setDefault(LauncherMode.REPAIR.name()); opt2.setHelp("specify launcherMode." + "REPAIR: standard repairnator repair with Travis build ids. BEARS: analyze pairs of bugs and human-produced patches. " + "CHECKSTYLE: analyze build failing because of checkstyle. " + "GIT_REPOSITORY: repairnator repair with Git instead of standard Travis. " + "KUBERNETES_LISTENER: run repairnator as a Activemq server listening for Travis build ids. "); jsap.registerParameter(opt2); return jsap; }
Example 2
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgOutput(LauncherType launcherType, String helpMessage) { FlaggedOption opt = new FlaggedOption("output"); opt.setShortFlag('o'); opt.setLongFlag("output"); // we don't assume the presence of "/tmp" (eg on windows) and the it is writable opt.setDefault("./repairnator-output"); if (launcherType == LauncherType.DOCKERPOOL || launcherType == LauncherType.CHECKBRANCHES) { opt.setRequired(true); } opt.setHelp(helpMessage); return opt; }
Example 3
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgGlobalTimeout() { FlaggedOption opt = new FlaggedOption("globalTimeout"); opt.setShortFlag('g'); opt.setLongFlag("globalTimeout"); opt.setStringParser(JSAP.INTEGER_PARSER); opt.setDefault("1"); opt.setHelp("Specify the number of day before killing the whole pool."); return opt; }
Example 4
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgNbThreads() { FlaggedOption opt = new FlaggedOption("threads"); opt.setShortFlag('t'); opt.setLongFlag("threads"); opt.setStringParser(JSAP.INTEGER_PARSER); opt.setDefault("1"); opt.setHelp("Specify the number of threads to run in parallel"); return opt; }
Example 5
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgNotifyto() { FlaggedOption opt = new FlaggedOption("notifyto"); opt.setLongFlag("notifyto"); opt.setList(true); opt.setListSeparator(','); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify email addresses to notify"); return opt; }
Example 6
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgSmtpPassword() { FlaggedOption opt = new FlaggedOption("smtpPassword"); opt.setLongFlag("smtpPassword"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Password for authorized server"); return opt; }
Example 7
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgSmtpUsername() { FlaggedOption opt = new FlaggedOption("smtpUsername"); opt.setLongFlag("smtpUsername"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Username for authorized server"); return opt; }
Example 8
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgPushUrl() { FlaggedOption opt = new FlaggedOption("pushUrl"); opt.setLongFlag("pushurl"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify repository URL to push data on the format https://github.com/user/repo."); return opt; }
Example 9
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgSmtpServer() { FlaggedOption opt = new FlaggedOption("smtpServer"); opt.setLongFlag("smtpServer"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify SMTP server to use for Email notification"); return opt; }
Example 10
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgMongoDBName() { FlaggedOption opt = new FlaggedOption("mongoDBName"); opt.setLongFlag("dbname"); opt.setDefault("repairnator"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify mongodb DB name."); return opt; }
Example 11
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgGithubUserEmail() { FlaggedOption opt = new FlaggedOption("githubUserEmail"); opt.setLongFlag("githubUserEmail"); opt.setDefault("[email protected]"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify the email of the user who commits"); return opt; }
Example 12
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgBranchInput() { /* ./branches.txt contain one branch per line typically from https://github.com/Spirals-Team/librepair-experiments/ */ FlaggedOption opt = new FlaggedOption("input"); opt.setShortFlag('i'); opt.setLongFlag("input"); opt.setDefault("./projects.txt"); opt.setHelp("Specify the input file containing the list of branches to reproduce (one branch per line)"); return opt; }
Example 13
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgProjectInput() { /* ./projects.txt contain one slug per line INRIA/spoon rails/rails .... */ FlaggedOption opt = new FlaggedOption("input"); opt.setShortFlag('i'); opt.setLongFlag("input"); opt.setDefault("./projects.txt"); opt.setHelp("Specify where to find the list of projects to scan."); return opt; }
Example 14
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgInput() { /* ./builds.txt contain one build id per line 346537408 347223109 348887356 349620528 351046304 353774072 358555930 361311603 368867994 369727490 369854684 369859631 370885458 371144762 371488143 374841318 376812142 (this is the list from Expedition 2) */ FlaggedOption opt = new FlaggedOption("input"); opt.setShortFlag('i'); opt.setLongFlag("input"); opt.setDefault("./builds.txt"); opt.setHelp("Specify the input file containing the list of build ids."); return opt; }
Example 15
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgGithubOAuth() { FlaggedOption opt = new FlaggedOption("ghOauth"); opt.setLongFlag("ghOauth"); opt.setStringParser(JSAP.STRING_PARSER); opt.setDefault(System.getenv("GITHUB_OAUTH")); opt.setHelp("Specify Github Token to use"); return opt; }
Example 16
Source File: GitRepositoryLauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgGitRepositoryIdCommit() { FlaggedOption opt = new FlaggedOption("gitRepositoryIdCommit"); opt.setLongFlag("gitrepoidcommit"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify the commit id of the given repository (only in GIT_REPOSITORY mode)."); return opt; }
Example 17
Source File: GitRepositoryLauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgGitRepositoryBranch() { FlaggedOption opt = new FlaggedOption("gitRepositoryBranch"); opt.setLongFlag("gitrepobranch"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify a branch of the given repository (only in GIT_REPOSITORY mode)"); return opt; }
Example 18
Source File: GitRepositoryLauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgGitRepositoryUrl() { FlaggedOption opt = new FlaggedOption("gitRepositoryUrl"); opt.setLongFlag("gitrepourl"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify a Git repository URL (only in GIT_REPOSITORY mode)."); return opt; }
Example 19
Source File: BuildAnalyzerLauncher.java From repairnator with MIT License | 4 votes |
private JSAP defineArgs() throws JSAPException { // Verbose output JSAP jsap = new JSAP(); // -h or --help jsap.registerParameter(LauncherUtils.defineArgHelp()); // -d or --debug jsap.registerParameter(LauncherUtils.defineArgDebug()); // --runId jsap.registerParameter(LauncherUtils.defineArgRunId()); // --bears jsap.registerParameter(LauncherUtils.defineArgBearsMode()); // --checkstyle jsap.registerParameter(LauncherUtils.defineArgCheckstyleMode()); // -i or --input jsap.registerParameter(LauncherUtils.defineArgInput()); // -o or --output jsap.registerParameter(LauncherUtils.defineArgOutput(LauncherType.DOCKERPOOL,"Specify where to put serialized files from dockerpool")); // --dbhost jsap.registerParameter(LauncherUtils.defineArgMongoDBHost()); // --dbname jsap.registerParameter(LauncherUtils.defineArgMongoDBName()); // --notifyEndProcess jsap.registerParameter(LauncherUtils.defineArgNotifyEndProcess()); // --smtpServer jsap.registerParameter(LauncherUtils.defineArgSmtpServer()); // --smtpPort jsap.registerParameter(LauncherUtils.defineArgSmtpPort()); // --smtpTLS jsap.registerParameter(LauncherUtils.defineArgSmtpTLS()); // --smtpUsername jsap.registerParameter(LauncherUtils.defineArgSmtpUsername()); // --smtpPassword jsap.registerParameter(LauncherUtils.defineArgSmtpPassword()); // --notifyto jsap.registerParameter(LauncherUtils.defineArgNotifyto()); // -n or --name jsap.registerParameter(LauncherUtils.defineArgDockerImageName()); // --skipDelete jsap.registerParameter(LauncherUtils.defineArgSkipDelete()); // --createOutputDir jsap.registerParameter(LauncherUtils.defineArgCreateOutputDir()); // -t or --threads jsap.registerParameter(LauncherUtils.defineArgNbThreads()); // -g or --globalTimeout jsap.registerParameter(LauncherUtils.defineArgGlobalTimeout()); // --pushurl jsap.registerParameter(LauncherUtils.defineArgPushUrl()); // --ghOauth jsap.registerParameter(LauncherUtils.defineArgGithubOAuth()); // --githubUserName jsap.registerParameter(LauncherUtils.defineArgGithubUserName()); // --githubUserEmail jsap.registerParameter(LauncherUtils.defineArgGithubUserEmail()); // --createPR jsap.registerParameter(LauncherUtils.defineArgCreatePR()); FlaggedOption opt2 = new FlaggedOption("repairTools"); opt2.setLongFlag("repairTools"); opt2.setList(true); opt2.setListSeparator(','); opt2.setHelp("Specify one or several repair tools to use separated by commas (available tools might depend of your docker image)"); opt2.setDefault("NopolAllTests"); jsap.registerParameter(opt2); return jsap; }
Example 20
Source File: CheckBranchLauncher.java From repairnator with MIT License | 4 votes |
private JSAP defineArgs() throws JSAPException { // Verbose output JSAP jsap = new JSAP(); // -h or --help jsap.registerParameter(LauncherUtils.defineArgHelp()); // -d or --debug jsap.registerParameter(LauncherUtils.defineArgDebug()); // --runId jsap.registerParameter(LauncherUtils.defineArgRunId()); // --bears jsap.registerParameter(LauncherUtils.defineArgBearsMode()); // -i or --input jsap.registerParameter(LauncherUtils.defineArgBranchInput()); // -o or --output jsap.registerParameter(LauncherUtils.defineArgOutput(LauncherType.CHECKBRANCHES, "Specify where to put output data")); // --notifyEndProcess jsap.registerParameter(LauncherUtils.defineArgNotifyEndProcess()); // --smtpServer jsap.registerParameter(LauncherUtils.defineArgSmtpServer()); //--smtpPort jsap.registerParameter(LauncherUtils.defineArgSmtpPort()); //--smtpTLS jsap.registerParameter(LauncherUtils.defineArgSmtpTLS()); // --smtpUsername jsap.registerParameter(LauncherUtils.defineArgSmtpUsername()); // --smtpPassword jsap.registerParameter(LauncherUtils.defineArgSmtpPassword()); // --notifyto jsap.registerParameter(LauncherUtils.defineArgNotifyto()); // -n or --name jsap.registerParameter(LauncherUtils.defineArgDockerImageName()); // --skipDelete jsap.registerParameter(LauncherUtils.defineArgSkipDelete()); // -t or --threads jsap.registerParameter(LauncherUtils.defineArgNbThreads()); // -g or --globalTimeout jsap.registerParameter(LauncherUtils.defineArgGlobalTimeout()); Switch sw1 = new Switch("humanPatch"); sw1.setShortFlag('p'); sw1.setLongFlag("humanPatch"); sw1.setDefault("false"); jsap.registerParameter(sw1); FlaggedOption opt2 = new FlaggedOption("repository"); opt2.setShortFlag('r'); opt2.setLongFlag("repository"); opt2.setStringParser(JSAP.STRING_PARSER); opt2.setRequired(true); opt2.setHelp("Specify where to collect branches"); jsap.registerParameter(opt2); return jsap; }