public PluginInfo(String directory) throws IOException {
this(new File(directory));
}
public PluginInfo(File dir) throws IOException {
PropertieBase propertie = new PropertieBase(dir.getCanonicalPath()
+ "/plugin.prop");
propertie.load();
// LOAD GENERAL INFO ABOUT PLUGIN
name = propertie.getValue(PROP_PLUGIN_NAME);
corePlugin = propertie.getValue(PROP_CLASS_CORE_PLUGIN_NAME);
documentPlugin = propertie.getValue(PROP_CLASS_DOCUMENT_PLUGIN_NAME);
// LOAD MAIN JAR
String jarFile = propertie.getValue(PROP_JAR_NAME);
jar = new File(dir, jarFile.trim());
if (!jar.exists()) {
throw new FileNotFoundException(
"Impossible de trouver le fichier jar"
+ jar.getCanonicalPath() + ", du plugin " + name);
}
// LOAD JAR DEPENDENCIES
String depsString = propertie.getValue(PROP_DEPENDENCIES);
String[] deps = depsString.split(DEPENDENCIES_SEPERATOR);
dependencies = new ArrayList<>();
for (String dep : deps) {
File fileDep = new File(dir, dep.trim());