Skip to content

Commit

Permalink
Fix Maven and Gradle commands on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mhalbritter committed Oct 1, 2024
1 parent ccce62c commit 90b5a3e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,13 @@ private void releaseHome(BuildSystem buildSystem, Path home) {

private ProcessBuilder createProcessBuilder(BuildSystem buildSystem, Path home) {
if (buildSystem.id().equals(MavenBuildSystem.ID)) {
ProcessBuilder processBuilder = new ProcessBuilder((isWindows()) ? "mvnw.cmd" : "./mvnw",
ProcessBuilder processBuilder = new ProcessBuilder((isWindows()) ? "./mvnw.cmd" : "./mvnw",
"-Dmaven.repo.local=" + home.resolve("repository").toFile(), "package");
processBuilder.environment().put("MAVEN_USER_HOME", home.toFile().getAbsolutePath());
return processBuilder;
}
if (buildSystem.id().equals(GradleBuildSystem.ID)) {
ProcessBuilder processBuilder = new ProcessBuilder((isWindows()) ? "gradlew.bat" : "./gradlew",
ProcessBuilder processBuilder = new ProcessBuilder((isWindows()) ? "./gradlew.bat" : "./gradlew",
"--no-daemon", "build");
processBuilder.environment().put("GRADLE_USER_HOME", home.toFile().getAbsolutePath());
return processBuilder;
Expand Down

0 comments on commit 90b5a3e

Please sign in to comment.