private static void addSystemResource(File jarFile) throws IOException { try (FileInputStream fio = new FileInputStream(jarFile)) { Manifest manifest = getManifest(fio); if (manifest != null) { ManifestResource mre = new ManifestResource(jarFile.getAbsolutePath(), manifest, ManifestResource.SYSTEM); containerManifestResources.add(mre); } } }
/** * Add the JARs specified to the extension list. */ private static void addFolderList(String property) { // get the files in the extensions directory String extensionsDir = System.getProperty(property); if (extensionsDir != null) { StringTokenizer extensionsTok = new StringTokenizer(extensionsDir, File.pathSeparator); while (extensionsTok.hasMoreTokens()) { File targetDir = new File(extensionsTok.nextToken()); if (!targetDir.exists() || !targetDir.isDirectory()) { continue; } File[] files = targetDir.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].getName().toLowerCase().endsWith(".jar")) { try { addSystemResource(files[i]); } catch (IOException e) { log.error (sm.getString ("extensionValidator.failload", files[i]), e); } } } } } }
Manifest jmanifest = getManifest(inputStream); if (jmanifest != null) { ManifestResource mre = new ManifestResource(jarName, return validateManifestResources(appName, appManifestResources);
ExtensionValidator.validateApplication(getResources(), this); } catch (IOException ioe) { String msg = MessageFormat.format(rb.getString(LogFacade.DEPENDENCY_CHECK_EXCEPTION), this);
availableExtensions = buildAvailableExtensionsList(resources); = buildAvailableExtensionsList(containerManifestResources);
return validateManifestResources(appName, appManifestResources);
Manifest jmanifest = getManifest(resource.streamContent()); if (jmanifest != null) { ManifestResource mre = new ManifestResource( return validateManifestResources(appName, appManifestResources);
dependencyCheck = ExtensionValidator.validateApplication (getResources(), this); } catch (IOException ioe) {
availableExtensions = buildAvailableExtensionsList(resources); = buildAvailableExtensionsList(containerManifestResources);
return validateManifestResources(appName, appManifestResources);
Manifest jmanifest = getManifest(resource.streamContent()); if (jmanifest != null) { ManifestResource mre = new ManifestResource( return validateManifestResources(appName, appManifestResources);
/** * Add the JARs specified to the extension list. */ private static void addFolderList(String property) { // get the files in the extensions directory String extensionsDir = System.getProperty(property); if (extensionsDir != null) { StringTokenizer extensionsTok = new StringTokenizer(extensionsDir, File.pathSeparator); while (extensionsTok.hasMoreTokens()) { File targetDir = new File(extensionsTok.nextToken()); if (!targetDir.exists() || !targetDir.isDirectory()) { continue; } File[] files = targetDir.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].getName().toLowerCase().endsWith(".jar")) { try { addSystemResource(files[i]); } catch (IOException e) { log.error (sm.getString ("extensionValidator.failload", files[i]), e); } } } } } }
/** * Checks to see if the given system JAR file contains a MANIFEST, and adds * it to the container's manifest resources. * * @param jarFile The system JAR whose manifest to add */ public static void addSystemResource(File jarFile) throws IOException { Manifest manifest = getManifest(new FileInputStream(jarFile)); if (manifest != null) { ManifestResource mre = new ManifestResource(jarFile.getAbsolutePath(), manifest, ManifestResource.SYSTEM); containerManifestResources.add(mre); } }
dependencyCheck = ExtensionValidator.validateApplication (getResources(), this); } catch (IOException ioe) {
availableExtensions = buildAvailableExtensionsList(resources); = buildAvailableExtensionsList(containerManifestResources);
return validateManifestResources(appName, appManifestResources);
if (resourceObject instanceof Resource) { Resource resource = (Resource) resourceObject; Manifest jmanifest = getManifest(resource.streamContent()); if (jmanifest != null) { ManifestResource mre = new ManifestResource( return validateManifestResources(appName, appManifestResources);
/** * Add the JARs specified to the extension list. */ private static void addFolderList(String property) { // get the files in the extensions directory String extensionsDir = System.getProperty(property); if (extensionsDir != null) { StringTokenizer extensionsTok = new StringTokenizer(extensionsDir, File.pathSeparator); while (extensionsTok.hasMoreTokens()) { File targetDir = new File(extensionsTok.nextToken()); if (!targetDir.isDirectory()) { continue; } File[] files = targetDir.listFiles(); for (int i = 0; i < files.length; i++) { if (files[i].getName().toLowerCase(Locale.ENGLISH).endsWith(".jar") && files[i].isFile()) { try { addSystemResource(files[i]); } catch (IOException e) { log.error (sm.getString ("extensionValidator.failload", files[i]), e); } } } } } }
/** * Checks to see if the given system JAR file contains a MANIFEST, and adds * it to the container's manifest resources. * * @param jarFile The system JAR whose manifest to add */ public static void addSystemResource(File jarFile) throws IOException { Manifest manifest = getManifest(new FileInputStream(jarFile)); if (manifest != null) { ManifestResource mre = new ManifestResource(jarFile.getAbsolutePath(), manifest, ManifestResource.SYSTEM); containerManifestResources.add(mre); } }
dependencyCheck = ExtensionValidator.validateApplication (getResources(), this); } catch (IOException ioe) {