public JVMStarter withWorkingDirectory(File workingDirectory) { commandline.setWorkingDirectory(workingDirectory); return this; }
public static void launchSubversion( String line, String basedir ) throws VerificationException { try { Commandline cli = new Commandline( line ); cli.setWorkingDirectory( basedir ); Writer logWriter = new FileWriter( new File( basedir, LOG_FILENAME ) ); StreamConsumer out = new WriterStreamConsumer( logWriter ); StreamConsumer err = new WriterStreamConsumer( logWriter ); System.out.println( "Command: " + CommandLineUtils.toString( cli.getCommandline() ) ); int ret = CommandLineUtils.executeCommandLine( cli, out, err ); logWriter.close(); if ( ret > 0 ) { System.err.println( "Exit code: " + ret ); throw new VerificationException(); } } catch ( CommandLineException e ) { throw new VerificationException( e ); } catch ( IOException e ) { throw new VerificationException( e ); } }
cmd.setWorkingDirectory( workingDirectory );