You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (newFile(projectRootPom, gradleWrapper).exists()) {
57
57
GRADLE_CMD = gradleWrapper;
58
-
} elseif (commandExists(gradle)) {
59
-
GRADLE_CMD = gradle;
60
58
} else {
61
-
thrownewIllegalStateException("Could not file a valid gradle command. I did not find " + gradleWrapper + " or " + gradle + " in the project directory or in the system PATH.");
59
+
GRADLE_CMD = gradle;
62
60
}
63
61
returnGRADLE_CMD;
64
62
}
@@ -229,6 +227,9 @@ public static boolean downloadLibraryDependencies(String projectPath, String pro
229
227
FilepomFile = newFile(projectRoot, "pom.xml");
230
228
if (pomFile.exists()) {
231
229
Log.info("Found pom.xml in the project directory. Using Maven to download dependencies.");
230
+
if (!commandExists(MAVEN_CMD))
231
+
thrownewIllegalStateException("Could not find a valid maven command. I did not find " + MAVEN_CMD + " in the project directory or in the system PATH.");
232
+
232
233
String[] mavenCommand = {
233
234
MAVEN_CMD, "--no-transfer-progress", "-f",
234
235
Paths.get(projectRoot, "pom.xml").toString(),
@@ -237,6 +238,10 @@ public static boolean downloadLibraryDependencies(String projectPath, String pro
Log.info("Found build.gradle or build.gradle.kts in the project directory. Using gradle to download dependencies.");
242
+
if (!commandExists(GRADLE_CMD))
243
+
thrownewIllegalStateException("Could not find a valid Gradle command. I did not find " + GRADLE_CMD + " in the project directory or in the system PATH.");
244
+
240
245
Log.info("Found build.gradle[.kts] in the project directory. Using Gradle to download dependencies.");
0 commit comments