Detect core plugins and prevent installation

This commit is contained in:
Rene Pfeuffer
2019-09-11 16:46:27 +02:00
parent a7cb1d3116
commit 0fdd1cea17
7 changed files with 56 additions and 6 deletions

View File

@@ -461,13 +461,16 @@ public final class PluginProcessor
Path descriptorPath = directory.resolve(PluginConstants.FILE_DESCRIPTOR);
if (Files.exists(descriptorPath)) {
boolean core = Files.exists(directory.resolve("core"));
ClassLoader cl = createClassLoader(classLoader, smp);
InstalledPluginDescriptor descriptor = createDescriptor(cl, descriptorPath);
WebResourceLoader resourceLoader = createWebResourceLoader(directory);
plugin = new InstalledPlugin(descriptor, cl, resourceLoader, directory);
plugin = new InstalledPlugin(descriptor, cl, resourceLoader, directory, core);
} else {
logger.warn("found plugin directory without plugin descriptor");
}