@@ -159,13 +159,13 @@ public static boolean gradleBuild(String projectPath) {
159
159
}
160
160
161
161
private static boolean buildProject (String projectPath , String build ) {
162
- File pomFile = new File (projectPath , "pom.xml" );
162
+ File pomFile = new File (String . valueOf ( Paths . get ( projectPath ). toAbsolutePath ()) , "pom.xml" );
163
163
if (build == null ) {
164
164
return true ;
165
165
} else if (build .equals ("auto" )) {
166
166
if (pomFile .exists ()) {
167
167
Log .info ("Found pom.xml in the project directory. Using Maven to build the project." );
168
- return mavenBuild (projectPath ); // Use Maven if pom.xml exists
168
+ return mavenBuild (Paths . get ( projectPath ). toAbsolutePath (). toString () ); // Use Maven if pom.xml exists
169
169
} else {
170
170
Log .info ("Did not find a pom.xml in the project directory. Using Gradle to build the project." );
171
171
return gradleBuild (projectPath ); // Otherwise, use Gradle
@@ -211,7 +211,7 @@ public static boolean downloadLibraryDependencies(String projectPath, String pro
211
211
// created download dir if it does not exist
212
212
String projectRoot = projectRootPom != null ? projectRootPom : projectPath ;
213
213
214
- File pomFile = new File (projectRoot , "pom.xml" );
214
+ File pomFile = new File (( new File ( projectRoot )). getAbsoluteFile () , "pom.xml" );
215
215
if (pomFile .exists ()) {
216
216
libDownloadPath = Paths .get (projectPath , "target" , LIB_DEPS_DOWNLOAD_DIR ).toAbsolutePath ();
217
217
if (mkLibDepDirs (projectPath ))
@@ -231,7 +231,7 @@ public static boolean downloadLibraryDependencies(String projectPath, String pro
231
231
));
232
232
}
233
233
Log .info ("Found pom.xml in the project directory. Using Maven to download dependencies." );
234
- String [] mavenCommand = {MAVEN_CMD , "--no-transfer-progress" , "-f" , Paths .get (projectRoot , "pom.xml" ).toString (), "dependency:copy-dependencies" , "-DoutputDirectory=" + libDownloadPath .toString ()};
234
+ String [] mavenCommand = {MAVEN_CMD , "--no-transfer-progress" , "-f" , Paths .get (projectRoot , "pom.xml" ).toAbsolutePath (). toString (), "dependency:copy-dependencies" , "-DoutputDirectory=" + libDownloadPath .toString ()};
235
235
return buildWithTool (mavenCommand );
236
236
} else if (new File (projectRoot , "build.gradle" ).exists () || new File (projectRoot , "build.gradle.kts" ).exists ()) {
237
237
libDownloadPath = Paths .get (projectPath , "build" , LIB_DEPS_DOWNLOAD_DIR ).toAbsolutePath ();
0 commit comments