Let the host choose the jar copy directory and the logger of pack loads

ModuleHost.copyingJarsTo(directory) and loggingTo(logger) replace the fixed
java.io.tmpdir and System.getLogger. A System.LoggerFinder would not work
for a plugin, whose classes are not on the system class loader.
This commit is contained in:
piexel committed 2026-10-06 14:04:11 +02:00
1 parent a325640d5d
commit c5a54558fa
8 files changed
+97 -22

No files matched your search

@@ -34,7 +34,7 @@ public final class LoadedPack implements AutoCloseable {
*/
public static LoadedPack load(Path packRoot, ModuleHost host) {
Objects.requireNonNull(host, "host");
var packModules = PackModules.load(packRoot, host.exposedHostPackages());
var packModules = PackModules.load(packRoot, host.exposedHostPackages(), host.jarCopyRoot(), host.logger());
try {
var loaded = LoadedModules.load(host.withPackModules(packModules.modules()),
host.reservedHostFields(), host.reservedNamespaces());