use of org.springframework.ide.vscode.commons.util.ExternalProcess in project sts4 by spring-projects.
the class MavenBuilder method execute.
public void execute() throws IOException, InterruptedException, TimeoutException {
Path mvnwPath = System.getProperty("os.name").toLowerCase().startsWith("win") ? projectPath.resolve("mvnw.cmd") : projectPath.resolve("mvnw");
mvnwPath.toFile().setExecutable(true);
List<String> all = new ArrayList<>(1 + targets.size() + properties.size());
all.add(mvnwPath.toAbsolutePath().toString());
all.addAll(targets);
all.addAll(properties);
ExternalProcess process = new ExternalProcess(projectPath.toFile(), new ExternalCommand(all.toArray(new String[all.size()])), true);
if (process.getExitValue() != 0) {
throw new RuntimeException("Failed to build test project! " + process);
}
}
Aggregations