Skip to content

Commit

Permalink
Merge pull request #111 from codellm-devkit/make-wrapper-paths-absolute
Browse files Browse the repository at this point in the history
The gradlew/mvnw path must be made absolute
  • Loading branch information
rahlk authored Feb 11, 2025
2 parents 1af764f + 8040e3d commit 34387ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 1 addition & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1 @@
<<<<<<< HEAD
version=1.1.1

=======
version=1.1.0
>>>>>>> 9792b653d3b4509e5b74120747e13e69417da994
version=1.1.2
4 changes: 2 additions & 2 deletions src/main/java/com/ibm/cldk/utils/BuildProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class BuildProject {
public static String getMavenCommand() {
String mvnSystemCommand = Arrays.stream(System.getenv("PATH").split(System.getProperty("path.separator"))).map(path -> new File(path, System.getProperty("os.name").toLowerCase().contains("windows") ? "mvn.cmd" : "mvn")).filter(File::exists).findFirst().map(File::getAbsolutePath).orElse(null);
File mvnWrapper = System.getProperty("os.name").toLowerCase().contains("windows") ? new File(projectRootPom, "mvnw.cmd") : new File(projectRootPom, "mvnw");
return commandExists(mvnWrapper).getKey() ? mvnWrapper.toString() : mvnSystemCommand;
return commandExists(mvnWrapper.getAbsoluteFile()).getKey() ? mvnWrapper.getAbsoluteFile().toString() : mvnSystemCommand;
}

/**
Expand All @@ -46,7 +46,7 @@ public static String getGradleCommand() {
String gradleSystemCommand = Arrays.stream(System.getenv("PATH").split(System.getProperty("path.separator"))).map(path -> new File(path, System.getProperty("os.name").toLowerCase().contains("windows") ? "gradle.bat" : "gradle")).filter(File::exists).findFirst().map(File::getAbsolutePath).orElse(null);
File gradleWrapper = System.getProperty("os.name").toLowerCase().contains("windows") ? new File(projectRootPom, "gradlew.bat") : new File(projectRootPom, "gradlew");

return commandExists(gradleWrapper).getKey() ? gradleWrapper.toString() : gradleSystemCommand;
return commandExists(gradleWrapper.getAbsoluteFile()).getKey() ? gradleWrapper.getAbsoluteFile().toString() : gradleSystemCommand;
}

public static Path tempInitScript;
Expand Down

0 comments on commit 34387ac

Please sign in to comment.