public static Commandline createStarteamBaseCommandLine( String action, StarteamScmProviderRepository repo ) { Commandline cl = new Commandline(); cl.createArg().setValue( "stcmd" ); cl.createArg().setValue( action ); cl.createArg().setValue( "-x" ); cl.createArg().setValue( "-nologo" ); cl.createArg().setValue( "-stop" ); return cl; }
protected Commandline createUpdateConfigSpecCommandLine( File workingDirectory, File configSpecLocation, String viewName ) { Commandline command = new Commandline(); command.setWorkingDirectory( workingDirectory.getAbsolutePath() ); command.setExecutable( "cleartool" ); command.createArg().setValue( "setcs" ); command.createArg().setValue( "-tag" ); command.createArg().setValue( viewName ); command.createArg().setValue( configSpecLocation.getAbsolutePath() ); return command; }
Commandline cl = new Commandline(); cl.setExecutable( COMMAND_CLASS ); cl.createArg().setValue( TASK_CLASS ); CommandLineBuilder builder = new CommandLineBuilder( "macker" ); for ( Iterator/*<String>*/it = options.iterator(); it.hasNext(); ) { builder.addArg( (String) it.next() ); } builder.saveArgs(); String commandsFile = builder.getCommandLineFile(); cl.createArg().setValue( commandsFile ); StringStreamConsumer stdout = new StringStreamConsumer(); StringStreamConsumer stderr = new StringStreamConsumer(); int exitCode = CommandLineUtils.executeCommandLine( cl, stdout, stderr );
private static void composeCommand( File workingDirectory, String command, Commandline cl ) { Settings settings = GitUtil.getSettings(); cl.setExecutable( settings.getGitCommand() ); cl.createArg().setValue( command ); if ( workingDirectory != null ) { cl.setWorkingDirectory( workingDirectory.getAbsolutePath() ); } }
public static Commandline createCommandLine( File workingDirectory, String filename ) { Commandline command = new Commandline(); command.setWorkingDirectory( workingDirectory ); command.setExecutable( "tfpt" ); command.createArg().setValue( "annotate" ); command.createArg().setValue( "/noprompt" ); command.createArg().setValue( filename ); return command; } }
public static Commandline createStarteamBaseCommandLine( String action, StarteamScmProviderRepository repo ) { Commandline cl = new Commandline(); cl.createArg().setValue( "stcmd" ); cl.createArg().setValue( action ); cl.createArg().setValue( "-x" ); cl.createArg().setValue( "-nologo" ); cl.createArg().setValue( "-stop" ); return cl; }
Commandline cl = new Commandline(); cl.setExecutable( "dir" ); cl.setWorkingDirectory( workingDirectory.getAbsolutePath() ); cl.createArg().setValue( "/S" ); StreamConsumer consumer = new StreamConsumer() { public void consumeLine( String line ) { //do something with the line } }; StreamConsumer stderr = new StreamConsumer() { public void consumeLine( String line ) { //do something with the line } }; int exitCode; try { exitCode = CommandLineUtils.execute( cl, consumer, stderr, getLogger() ); } catch ( CommandLineException ex ) { //handle exception }
private static void composeCommand( File workingDirectory, String command, Commandline cl ) { Settings settings = GitUtil.getSettings(); cl.setExecutable( settings.getGitCommand() ); cl.createArg().setValue( command ); if ( workingDirectory != null ) { cl.setWorkingDirectory( workingDirectory.getAbsolutePath() ); } }
public static Commandline createCommandLine( File workingDirectory, String filename ) { Commandline command = new Commandline(); command.setWorkingDirectory( workingDirectory ); command.setExecutable( "tfpt" ); command.createArg().setValue( "annotate" ); command.createArg().setValue( "/noprompt" ); command.createArg().setValue( filename ); return command; } }
private Commandline getCommandLine() throws ExecutionException { Commandline commandline = new Commandline(this.phantomJsBinary); if (configFile != null && configFile.exists()) { commandline.createArg().setValue("--config=" + configFile.getAbsolutePath()); } else { commandline.addArguments(this.getCommandLineOptions(commandLineOptions)); } if (script != null) { commandline.createArg().setValue(script); } if (arguments != null) { commandline.addArguments(arguments.toArray(new String[arguments.size()])); } if (workingDirectory != null) { commandline.setWorkingDirectory(workingDirectory); } return commandline; }
protected Commandline createUpdateConfigSpecCommandLine( File workingDirectory, File configSpecLocation, String viewName ) { Commandline command = new Commandline(); command.setWorkingDirectory( workingDirectory.getAbsolutePath() ); command.setExecutable( "cleartool" ); command.createArg().setValue( "setcs" ); command.createArg().setValue( "-tag" ); command.createArg().setValue( viewName ); command.createArg().setValue( configSpecLocation.getAbsolutePath() ); return command; }
private static Commandline createNewLabelCommandLine( ScmFileSet scmFileSet, String tag ) { Commandline command = new Commandline(); File workingDirectory = scmFileSet.getBasedir(); command.setWorkingDirectory( workingDirectory.getAbsolutePath() ); command.setExecutable( "cleartool" ); command.createArg().setValue( "mklbtype" ); command.createArg().setValue( "-nc" ); command.createArg().setValue( tag ); return command; } }
public static Commandline createCommandLine( ScmFileSet scmFileSet ) { Commandline command = new Commandline(); File workingDirectory = scmFileSet.getBasedir(); command.setWorkingDirectory( workingDirectory.getAbsolutePath() ); command.setExecutable( "cleartool" ); command.createArg().setValue( "lscheckout" ); command.createArg().setValue( "-cview" ); command.createArg().setValue( "-r" ); command.createArg().setValue( "-fmt" ); command.createArg().setValue( "%n\\n" ); return command; } }
public static Commandline createCheckinCurrentDirCommandLine( ScmFileSet scmFileSet ) { Commandline command = new Commandline(); File workingDirectory = scmFileSet.getBasedir(); command.setWorkingDirectory( workingDirectory.getAbsolutePath() ); command.setExecutable( "cleartool" ); command.createArg().setValue( "ci" ); command.createArg().setValue( "-nc" ); command.createArg().setValue( "." ); return command; }