Compare commits

..

1 commit

Author SHA1 Message Date
Erik C. Thauvin cff0c9d7ee
Merge fb88954933 into cddd3ec429 2026-07-08 23:48:13 +00:00

View file

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