com.martiansoftware.jsap.JSAP Java Examples
The following examples show how to use
com.martiansoftware.jsap.JSAP.
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: TestPipelinebTravisMode.java From repairnator with MIT License | 6 votes |
@Test public void testPipelineArgs() throws Exception { JSAP defaultJsap = (new DefaultDefineJSAPArgs()).defineArgs(); // the default repair tool assertEquals(1, ((FlaggedOption)defaultJsap.getByLongFlag("repairTools")).getDefault().length); assertEquals("NPEFix", ((FlaggedOption)defaultJsap.getByLongFlag("repairTools")).getDefault()[0]); // by default the activemq username and password should be blank assertEquals("", ((FlaggedOption)defaultJsap.getByLongFlag("activemqusername")).getDefault()[0]); assertEquals("", ((FlaggedOption)defaultJsap.getByLongFlag("activemqpassword")).getDefault()[0]); // non default value is accepted assertEquals("NopolAllTests", ((FlaggedOption)defaultJsap.getByLongFlag("repairTools")).getStringParser().parse("NopolAllTests")); // incorrect values are rejected try { ((FlaggedOption)defaultJsap.getByLongFlag("repairTools")).getStringParser().parse("garbage"); fail(); } catch (Exception expected) {} }
Example #2
Source File: GZIPIndexer.java From BUbiNG with Apache License 2.0 | 6 votes |
public static void main(String[] arg) throws IOException, JSAPException { final SimpleJSAP jsap = new SimpleJSAP(GZIPIndexer.class.getName(), "Computes and stores a quasi-succinct index for a compressed archive.", new Parameter[] { new UnflaggedOption("archive", JSAP.STRING_PARSER, JSAP.REQUIRED, "The name a GZIP's archive."), new UnflaggedOption("index", JSAP.STRING_PARSER, JSAP.REQUIRED, "The output (a serialized LongBigList of pointers to the records in the archive) filename."), } ); final JSAPResult jsapResult = jsap.parse(arg); if (jsap.messagePrinted()) return; final FastBufferedInputStream input = new FastBufferedInputStream(new FileInputStream(jsapResult.getString("archive"))); ProgressLogger pl = new ProgressLogger(LOGGER, 1, TimeUnit.MINUTES, "records"); pl.start("Scanning..."); final EliasFanoMonotoneLongBigList list = new EliasFanoMonotoneLongBigList(index(input, pl)); pl.done(); BinIO.storeObject(list, jsapResult.getString("index")); }
Example #3
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 #4
Source File: GZIPArchiveWriterTest.java From BUbiNG with Apache License 2.0 | 6 votes |
public static void main(String[] args) throws IOException, JSAPException { SimpleJSAP jsap = new SimpleJSAP(GZIPArchiveReader.class.getName(), "Writes some random records on disk.", new Parameter[] { new Switch("fully", 'f', "fully", "Whether to read fully the record (and do a minimal cosnsistency check)."), new UnflaggedOption("path", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The path to read from."), }); JSAPResult jsapResult = jsap.parse(args); if (jsap.messagePrinted()) System.exit(1); final boolean fully = jsapResult.getBoolean("fully"); GZIPArchiveReader gzar = new GZIPArchiveReader(new FileInputStream(jsapResult.getString("path"))); for (;;) { ReadEntry e = gzar.getEntry(); if (e == null) break; InputStream inflater = e.lazyInflater.get(); if (fully) ByteStreams.toByteArray(inflater); e.lazyInflater.consume(); System.out.println(e); } }
Example #5
Source File: BloomFilter.java From database with GNU General Public License v2.0 | 5 votes |
public static void main( final String[] arg ) throws IOException, JSAPException, NoSuchMethodException { final SimpleJSAP jsap = new SimpleJSAP( BloomFilter.class.getName(), "Creates a Bloom filter reading from standard input a newline-separated list of terms.", new Parameter[] { new FlaggedOption( "bufferSize", IntSizeStringParser.getParser(), "64Ki", JSAP.NOT_REQUIRED, 'b', "buffer-size", "The size of the I/O buffer used to read terms." ), new FlaggedOption( "encoding", ForNameStringParser.getParser( Charset.class ), "UTF-8", JSAP.NOT_REQUIRED, 'e', "encoding", "The term file encoding." ), new UnflaggedOption( "bloomFilter", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The filename for the serialised front-coded list." ), new UnflaggedOption( "size", JSAP.INTSIZE_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The size of the filter (i.e., the expected number of elements in the filter; usually, the number of terms)." ), new UnflaggedOption( "precision", JSAP.INTEGER_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The precision of the filter." ) }); JSAPResult jsapResult = jsap.parse( arg ); if ( jsap.messagePrinted() ) return; final int bufferSize = jsapResult.getInt( "bufferSize" ); final String filterName = jsapResult.getString( "bloomFilter" ); final Charset encoding = (Charset)jsapResult.getObject( "encoding" ); BloomFilter filter = new BloomFilter( jsapResult.getInt( "size" ), jsapResult.getInt( "precision" ) ); final ProgressLogger pl = new ProgressLogger(); pl.itemsName = "terms"; pl.start( "Reading terms..." ); MutableString s = new MutableString(); FastBufferedReader reader = new FastBufferedReader( new InputStreamReader( System.in, encoding ), bufferSize ); while( reader.readLine( s ) != null ) { filter.add( s ); pl.lightUpdate(); } pl.done(); BinIO.storeObject( filter, filterName ); }
Example #6
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 #7
Source File: LiterallySignedStringMap.java From database with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("unchecked") public static void main( final String[] arg ) throws IOException, JSAPException, ClassNotFoundException, SecurityException, NoSuchMethodException { final SimpleJSAP jsap = new SimpleJSAP( LiterallySignedStringMap.class.getName(), "Builds a shift-add-xor signed string map by reading a newline-separated list of strings and a function built on the same list of strings.", new Parameter[] { new FlaggedOption( "encoding", ForNameStringParser.getParser( Charset.class ), "UTF-8", JSAP.NOT_REQUIRED, 'e', "encoding", "The string file encoding." ), new Switch( "zipped", 'z', "zipped", "The string list is compressed in gzip format." ), new Switch( "text", 't', "text", "The string list actually a text file, with one string per line." ), new UnflaggedOption( "function", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The filename of the function to be signed." ), new UnflaggedOption( "list", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The filename of the serialised list of strings, or of a text file containing a list of strings, if -t is specified." ), new UnflaggedOption( "map", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The filename of the resulting map." ), }); JSAPResult jsapResult = jsap.parse( arg ); if ( jsap.messagePrinted() ) return; final String functionName = jsapResult.getString( "function" ); final String listName = jsapResult.getString( "list" ); final String mapName = jsapResult.getString( "map" ); final Charset encoding = (Charset)jsapResult.getObject( "encoding" ); final boolean zipped = jsapResult.getBoolean( "zipped" ); final boolean text = jsapResult.getBoolean( "text" ); ObjectList<MutableString> list = text ? new FileLinesCollection( listName, encoding.toString(), zipped ).allLines() : (ObjectList)BinIO.loadObject( listName ); LOGGER.info( "Signing..." ); BinIO.storeObject( new LiterallySignedStringMap( (Object2LongFunction)BinIO.loadObject( functionName ), list ), mapName ); LOGGER.info( "Completed." ); }
Example #8
Source File: TernaryIntervalSearchTree.java From database with GNU General Public License v2.0 | 5 votes |
public static void main( final String[] arg ) throws IOException, JSAPException, NoSuchMethodException { final SimpleJSAP jsap = new SimpleJSAP( TernaryIntervalSearchTree.class.getName(), "Builds a ternary interval search tree reading from standard input a newline-separated list of terms.", new Parameter[] { new FlaggedOption( "bufferSize", JSAP.INTSIZE_PARSER, "64Ki", JSAP.NOT_REQUIRED, 'b', "buffer-size", "The size of the I/O buffer used to read terms." ), new FlaggedOption( "encoding", ForNameStringParser.getParser( Charset.class ), "UTF-8", JSAP.NOT_REQUIRED, 'e', "encoding", "The term file encoding." ), new UnflaggedOption( "tree", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The filename for the serialised tree." ) }); JSAPResult jsapResult = jsap.parse( arg ); if ( jsap.messagePrinted() ) return; final TernaryIntervalSearchTree tree = new TernaryIntervalSearchTree(); MutableString term = new MutableString(); final ProgressLogger pl = new ProgressLogger(); pl.itemsName = "terms"; final FastBufferedReader terms = new FastBufferedReader( new InputStreamReader( System.in, (Charset)jsapResult.getObject( "encoding" ) ), jsapResult.getInt( "bufferSize" ) ); pl.start( "Reading terms..." ); while( terms.readLine( term ) != null ) { pl.update(); tree.add( term ); } pl.done(); BinIO.storeObject( tree, jsapResult.getString( "tree" ) ); }
Example #9
Source File: FrontCodedStringList.java From database with GNU General Public License v2.0 | 5 votes |
public static void main( final String[] arg ) throws IOException, JSAPException, NoSuchMethodException { final SimpleJSAP jsap = new SimpleJSAP( FrontCodedStringList.class.getName(), "Builds a front-coded string list reading from standard input a newline-separated ordered list of terms.", new Parameter[] { new FlaggedOption( "bufferSize", IntSizeStringParser.getParser(), "64Ki", JSAP.NOT_REQUIRED, 'b', "buffer-size", "The size of the I/O buffer used to read terms." ), new FlaggedOption( "encoding", ForNameStringParser.getParser( Charset.class ), "UTF-8", JSAP.NOT_REQUIRED, 'e', "encoding", "The term file encoding." ), new FlaggedOption( "ratio", IntSizeStringParser.getParser(), "4", JSAP.NOT_REQUIRED, 'r', "ratio", "The compression ratio." ), new Switch( "utf8", 'u', "utf8", "Store the strings as UTF-8 byte arrays." ), new Switch( "zipped", 'z', "zipped", "The term list is compressed in gzip format." ), new UnflaggedOption( "frontCodedList", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The filename for the serialised front-coded list." ) }); JSAPResult jsapResult = jsap.parse( arg ); if ( jsap.messagePrinted() ) return; final int bufferSize = jsapResult.getInt( "bufferSize" ); final int ratio = jsapResult.getInt( "ratio" ); final boolean utf8 = jsapResult.getBoolean( "utf8" ); final boolean zipped = jsapResult.getBoolean( "zipped" ); final String listName = jsapResult.getString( "frontCodedList" ); final Charset encoding = (Charset)jsapResult.getObject( "encoding" ); final ProgressLogger pl = new ProgressLogger(); pl.itemsName = "words"; pl.start( "Reading words..." ); final FrontCodedStringList frontCodedStringList = new FrontCodedStringList( new LineIterator( new FastBufferedReader( new InputStreamReader( zipped ? new GZIPInputStream( System.in ) : System.in, encoding ), bufferSize ), pl ), ratio, utf8 ); pl.done(); System.err.print( "Writing to file..." ); BinIO.storeObject( frontCodedStringList, listName ); System.err.println( " done." ); }
Example #10
Source File: ShiftAddXorSignedStringMap.java From database with GNU General Public License v2.0 | 5 votes |
@SuppressWarnings("unchecked") public static void main( final String[] arg ) throws NoSuchMethodException, IOException, JSAPException, ClassNotFoundException { final SimpleJSAP jsap = new SimpleJSAP( ShiftAddXorSignedStringMap.class.getName(), "Builds a shift-add-xor signed string map by reading a newline-separated list of strings and a function built on the same list of strings.", new Parameter[] { new FlaggedOption( "bufferSize", JSAP.INTSIZE_PARSER, "64Ki", JSAP.NOT_REQUIRED, 'b', "buffer-size", "The size of the I/O buffer used to read strings." ), new FlaggedOption( "encoding", ForNameStringParser.getParser( Charset.class ), "UTF-8", JSAP.NOT_REQUIRED, 'e', "encoding", "The string file encoding." ), new Switch( "zipped", 'z', "zipped", "The string list is compressed in gzip format." ), new FlaggedOption( "width", JSAP.INTEGER_PARSER, Integer.toString( Integer.SIZE ), JSAP.NOT_REQUIRED, 'w', "width", "The signature width in bits." ), new UnflaggedOption( "function", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The filename of the function to be signed." ), new UnflaggedOption( "map", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.REQUIRED, JSAP.NOT_GREEDY, "The filename of the resulting serialised signed string map." ), new UnflaggedOption( "stringFile", JSAP.STRING_PARSER, JSAP.NO_DEFAULT, JSAP.NOT_REQUIRED, JSAP.NOT_GREEDY, "Read strings from this file instead of standard input." ), }); JSAPResult jsapResult = jsap.parse( arg ); if ( jsap.messagePrinted() ) return; final int bufferSize = jsapResult.getInt( "bufferSize" ); final String functionName = jsapResult.getString( "function" ); final String mapName = jsapResult.getString( "map" ); final String stringFile = jsapResult.getString( "stringFile" ); final Charset encoding = (Charset)jsapResult.getObject( "encoding" ); final int width = jsapResult.getInt( "width" ); final boolean zipped = jsapResult.getBoolean( "zipped" ); final InputStream inputStream = stringFile != null ? new FileInputStream( stringFile ) : System.in; final Iterator<MutableString> iterator = new LineIterator( new FastBufferedReader( new InputStreamReader( zipped ? new GZIPInputStream( inputStream ) : inputStream, encoding ), bufferSize ) ); final Object2LongFunction<CharSequence> function = (Object2LongFunction<CharSequence>)BinIO.loadObject( functionName ); LOGGER.info( "Signing..." ); BinIO.storeObject( new ShiftAddXorSignedStringMap( iterator, function, width ), mapName ); LOGGER.info( "Completed." ); }
Example #11
Source File: PermutedFrontCodedStringList.java From database with GNU General Public License v2.0 | 5 votes |
public static void main( final String[] arg ) throws IOException, ClassNotFoundException, JSAPException { SimpleJSAP jsap = new SimpleJSAP( PermutedFrontCodedStringList.class.getName(), "Builds a permuted front-coded list of strings using a given front-coded string list and permutation", new Parameter[] { new Switch( "invert", 'i', "invert", "Invert permutation before creating the permuted list." ), new UnflaggedOption( "list", JSAP.STRING_PARSER, JSAP.REQUIRED, "A front-coded string list." ), new UnflaggedOption( "permutation", JSAP.STRING_PARSER, JSAP.REQUIRED, "A permutation for the indices of the list." ), new UnflaggedOption( "permutedList", JSAP.STRING_PARSER, JSAP.REQUIRED, "A the filename for the resulting permuted list." ), } ); JSAPResult jsapResult = jsap.parse( arg ); if ( jsap.messagePrinted() ) return; int[] basePermutation = BinIO.loadInts( jsapResult.getString( "permutation" ) ), permutation; if ( jsapResult.getBoolean( "invert" ) ) { int i = basePermutation.length; permutation = new int[ i ]; while( i-- != 0 ) permutation[ basePermutation[ i ] ] = i; } else permutation = basePermutation; basePermutation = null; BinIO.storeObject( new PermutedFrontCodedStringList( (FrontCodedStringList)BinIO.loadObject( jsapResult.getString( "list" ) ), permutation ), jsapResult.getString( "permutedList" ) ); }
Example #12
Source File: RTLauncher.java From repairnator with MIT License | 5 votes |
private RTLauncher(String[] args) throws JSAPException { JSAP jsap = this.defineArgs(); JSAPResult arguments = jsap.parse(args); LauncherUtils.checkArguments(jsap, arguments, LauncherType.REALTIME); this.initConfig(arguments); this.initSerializerEngines(); this.initNotifiers(); this.initSummaryEmails(); }
Example #13
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 #14
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 #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: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgGithubUserName() { FlaggedOption opt = new FlaggedOption("githubUserName"); opt.setLongFlag("githubUserName"); opt.setDefault("repairnator"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify the name of the user who commits"); return opt; }
Example #17
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 #18
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static void printUsage(JSAP jsap, LauncherType launcherType) { String moduleName = "repairnator-"+launcherType.name().toLowerCase(); System.err.println("Usage: java <"+moduleName+" name> [option(s)]"); System.err.println(); System.err.println("Options: "); System.err.println(); System.err.println(jsap.getHelp()); if (launcherType == LauncherType.PIPELINE) { System.err.println("The environment variable " + Utils.M2_HOME + " should be set and refer to the path of your maven home installation."); System.err.println("For using Nopol, you must add tools.jar in your classpath from your installed jdk"); } System.exit(-1); }
Example #19
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 #20
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgDockerImageName() { FlaggedOption opt = new FlaggedOption("imageName"); opt.setShortFlag('n'); opt.setLongFlag("name"); opt.setStringParser(JSAP.STRING_PARSER); opt.setDefault("repairnator/pipeline:latest"); opt.setHelp("Specify the docker image name to use."); return opt; }
Example #21
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 #22
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 #23
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 #24
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgSmtpPort() { FlaggedOption opt = new FlaggedOption("smtpPort"); opt.setLongFlag("smtpPort"); opt.setStringParser(JSAP.INTEGER_PARSER); opt.setDefault("25"); opt.setHelp("The port on which to contact the SMTP server. Default 25"); return opt; }
Example #25
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 #26
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 #27
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgMongoDBHost() { FlaggedOption opt = new FlaggedOption("mongoDBHost"); opt.setLongFlag("dbhost"); opt.setStringParser(JSAP.STRING_PARSER); opt.setHelp("Specify mongodb host."); return opt; }
Example #28
Source File: LauncherUtils.java From repairnator with MIT License | 5 votes |
public static FlaggedOption defineArgRunId() { FlaggedOption opt = new FlaggedOption("runId"); opt.setLongFlag("runId"); opt.setStringParser(JSAP.STRING_PARSER); opt.setDefault("1234"); opt.setHelp("Specify the run id for this launch."); return opt; }
Example #29
Source File: BuildAnalyzerLauncher.java From repairnator with MIT License | 5 votes |
private BuildAnalyzerLauncher(String[] args) throws JSAPException { JSAP jsap = this.defineArgs(); JSAPResult arguments = jsap.parse(args); LauncherUtils.checkArguments(jsap, arguments, LauncherType.DOCKERPOOL); this.initConfig(arguments); this.initSerializerEngines(); this.initNotifiers(); }
Example #30
Source File: CheckBranchLauncher.java From repairnator with MIT License | 5 votes |
private CheckBranchLauncher(String[] args) throws JSAPException { JSAP jsap = this.defineArgs(); JSAPResult arguments = jsap.parse(args); LauncherUtils.checkArguments(jsap, arguments, LauncherType.CHECKBRANCHES); this.initConfig(arguments); this.initNotifiers(); }