/** * Verify the given plugin is compatible with the current Elasticsearch installation. */ static void verifyCompatibility(PluginInfo info) { if (info.getElasticsearchVersion().equals(Version.CURRENT) == false) { throw new IllegalArgumentException("Plugin [" + info.getName() + "] was built for Elasticsearch version " + info.getElasticsearchVersion() + " but version " + Version.CURRENT + " is running"); } JarHell.checkJavaVersion(info.getName(), info.getJavaVersion()); }
/** inspect manifest for sure incompatibilities */ private static void checkManifest(Manifest manifest, Path jar) { // give a nice error if jar requires a newer java version String targetVersion = manifest.getMainAttributes().getValue("X-Compile-Target-JDK"); if (targetVersion != null) { checkVersionFormat(targetVersion); checkJavaVersion(jar.toString(), targetVersion); } }
/** inspect manifest for sure incompatibilities */ private static void checkManifest(Manifest manifest, Path jar) { // give a nice error if jar requires a newer java version String targetVersion = manifest.getMainAttributes().getValue("X-Compile-Target-JDK"); if (targetVersion != null) { checkVersionFormat(targetVersion); checkJavaVersion(jar.toString(), targetVersion); } }
/** inspect manifest for sure incompatibilities */ static void checkManifest(Manifest manifest, Path jar) { // give a nice error if jar requires a newer java version String targetVersion = manifest.getMainAttributes().getValue("X-Compile-Target-JDK"); if (targetVersion != null) { checkVersionFormat(targetVersion); checkJavaVersion(jar.toString(), targetVersion); } // give a nice error if jar is compiled against different es version String systemESVersion = Version.CURRENT.toString(); String targetESVersion = manifest.getMainAttributes().getValue("X-Compile-Elasticsearch-Version"); if (targetESVersion != null && targetESVersion.equals(systemESVersion) == false) { throw new IllegalStateException(jar + " requires Elasticsearch " + targetESVersion + ", your system: " + systemESVersion); } }
/** inspect manifest for sure incompatibilities */ static void checkManifest(Manifest manifest, Path jar) { // give a nice error if jar requires a newer java version String targetVersion = manifest.getMainAttributes().getValue("X-Compile-Target-JDK"); if (targetVersion != null) { checkVersionFormat(targetVersion); checkJavaVersion(jar.toString(), targetVersion); } // give a nice error if jar is compiled against different es version String systemESVersion = Version.CURRENT.toString(); String targetESVersion = manifest.getMainAttributes().getValue("X-Compile-Elasticsearch-Version"); if (targetESVersion != null && targetESVersion.equals(systemESVersion) == false) { throw new IllegalStateException(jar + " requires Elasticsearch " + targetESVersion + ", your system: " + systemESVersion); } }
JarHell.checkJavaVersion(name, javaVersionString); isolated = Boolean.parseBoolean(props.getProperty("isolated", "true")); classname = props.getProperty("classname");
JarHell.checkJavaVersion(name, javaVersionString); final String classname = props.getProperty("classname"); if (classname == null) {
/** * Verify the given plugin is compatible with the current Elasticsearch installation. */ static void verifyCompatibility(PluginInfo info) { if (info.getElasticsearchVersion().equals(Version.CURRENT) == false) { throw new IllegalArgumentException("Plugin [" + info.getName() + "] was built for Elasticsearch version " + info.getElasticsearchVersion() + " but version " + Version.CURRENT + " is running"); } JarHell.checkJavaVersion(info.getName(), info.getJavaVersion()); }
/** * Verify the given plugin is compatible with the current Elasticsearch installation. */ static void verifyCompatibility(PluginInfo info) { if (info.getElasticsearchVersion().equals(Version.CURRENT) == false) { throw new IllegalArgumentException("Plugin [" + info.getName() + "] was built for Elasticsearch version " + info.getElasticsearchVersion() + " but version " + Version.CURRENT + " is running"); } JarHell.checkJavaVersion(info.getName(), info.getJavaVersion()); }