Merge pull request #88 from nbaars/master
Properties are appended when loading plugins (#29)
This commit is contained in:
commit
aaa66cbc63
@ -2,6 +2,7 @@ package org.owasp.webgoat.plugins;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.owasp.webgoat.classloader.PluginClassLoader;
|
||||
import org.owasp.webgoat.util.LabelProvider;
|
||||
import org.slf4j.Logger;
|
||||
@ -62,6 +63,7 @@ public class PluginsLoader implements Runnable {
|
||||
|
||||
try {
|
||||
PluginFileUtils.createDirsIfNotExists(pluginTarget);
|
||||
cleanupExtractedPluginsDirectory();
|
||||
List<URL> jars = listJars();
|
||||
cl.addURL(jars);
|
||||
plugins = processPlugins(jars, reload);
|
||||
@ -71,6 +73,11 @@ public class PluginsLoader implements Runnable {
|
||||
return plugins;
|
||||
}
|
||||
|
||||
private void cleanupExtractedPluginsDirectory() {
|
||||
Path i18nDirectory = pluginTarget.resolve("plugin/i18n/");
|
||||
FileUtils.deleteQuietly(i18nDirectory.toFile());
|
||||
}
|
||||
|
||||
private List<URL> listJars() throws IOException {
|
||||
final List<URL> jars = Lists.newArrayList();
|
||||
Files.walkFileTree(pluginSource, new SimpleFileVisitor<Path>() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user