/** * Create a {@link SimpleApplicationSchema} to execute the Vagrant * command line. * * @return a {@link SimpleApplicationSchema} to execute the Vagrant * command line */ protected SimpleApplicationSchema instantiateSchema() { return new SimpleApplicationSchema(vagrantCommand).setWorkingDirectory(vagrantFile); }
ApplicationConsole console) throws IOException ProcessBuilder processBuilder = new ProcessBuilder(schema.getExecutableName()); File directory = schema.getWorkingDirectory(); Properties environmentVariables = schema.getEnvironmentVariablesBuilder().realize(); if (!schema.isEnvironmentInherited()) for (String argument : schema.getArguments()) processBuilder.redirectErrorStream(schema.isErrorStreamRedirected()); console, environmentVariables, schema.isDiagnosticsEnabled(), schema.getDefaultTimeout(), schema.getDefaultTimeoutUnits(), schema.getLifecycleInterceptors());
new SimpleApplicationSchema(wgetCommand).addArgument("-O").addArgument(targetFileName) .addArgument(sourceURL.toExternalForm());
@Override public void close() throws IOException { SimpleApplicationSchema schema = instantiateSchema(); CloseAction action = getOptions().get(CloseAction.class, CloseAction.Shutdown); switch (action) { case None : return; case PowerButton : schema.addArgument("destroy").addArgument("--force"); break; case Shutdown : schema.addArgument("halt"); break; case SaveState : schema.addArgument("suspend"); break; default : throw new IllegalArgumentException("Unsupported CloseAction " + action); } execute(schema); }
new SimpleApplicationSchema(curlCommand).addArgument(sourceURL.toExternalForm()) .addArgument("--create-dirs").addArgument("-o") .addArgument(StringHelper.doubleQuoteIfNecessary(targetFileName));
SimpleApplicationSchema schemaUp = instantiateSchema().addArgument("up");
SimpleApplicationSchema schema = instantiateSchema().addArgument("ssh-config");