Compare commits

...

2 commits

Author SHA1 Message Date
Erik C. Thauvin 95915d4d14
Merge 385b0cb2a8 into cddd3ec429 2026-07-09 09:36:24 -07:00
Erik C. Thauvin 385b0cb2a8
Minor cleanups 2026-07-09 09:36:03 -07:00

View file

@ -918,7 +918,8 @@ public class BaseProject extends BuildExecutor {
* <p> * <p>
* If the local dependency points to a directory, it will be scanned for jar files. * If the local dependency points to a directory, it will be scanned for jar files.
* *
* @param path the file system path of the local dependency * @param path the file system path (absolute or relative to the {@link #workDirectory})
* of the local dependency
* @since 2.3.1 * @since 2.3.1
*/ */
public LocalDependency local(Path path) { public LocalDependency local(Path path) {
@ -1036,7 +1037,8 @@ public class BaseProject extends BuildExecutor {
* <p> * <p>
* If the local module points to a directory, it will be scanned for jar files. * If the local module points to a directory, it will be scanned for jar files.
* *
* @param path the file system path of the local module * @param path the file system path (absolute or relative to the {@link #workDirectory})
* of the local module
* @since 2.3.1 * @since 2.3.1
*/ */
public LocalModule localModule(Path path) { public LocalModule localModule(Path path) {
@ -1913,25 +1915,25 @@ public class BaseProject extends BuildExecutor {
} }
private void addLocalJars(List<File> jars, String path) { private void addLocalJars(List<File> jars, String path) {
var localPath = Path.of(path); var local_path = Path.of(path);
if (!localPath.isAbsolute()) { if (!local_path.isAbsolute()) {
localPath = workDirectory().toPath().resolve(path); local_path = workDirectory().toPath().resolve(path);
} }
if (!Files.exists(localPath)) { if (!Files.exists(local_path)) {
if (verbose()) { if (verbose()) {
System.err.println("Invalid local path, skipped: " + path); System.err.println("Invalid local dependency path, skipped: " + path);
} }
return; return;
} }
if (Files.isDirectory(localPath)) { if (Files.isDirectory(local_path)) {
var localJarFiles = FileUtils.getFileList(localPath.toFile(), INCLUDED_JARS, EXCLUDED_JARS); var local_jar_files = FileUtils.getFileList(local_path.toFile(), INCLUDED_JARS, EXCLUDED_JARS);
for (var jar : localJarFiles) { for (var jar : local_jar_files) {
jars.add(localPath.resolve(jar).toFile()); jars.add(local_path.resolve(jar).toFile());
} }
} else { } else {
jars.add(localPath.toFile()); jars.add(local_path.toFile());
} }
} }