public List<BundleStorageUnit> getBundlesFromWebapp(String rootLocation) { List<BundleStorageUnit> bundles = new ArrayList<BundleStorageUnit>(); Set<String> resourcePaths = null; resourcePaths = WebResourceScanner.findResourcePaths(this.context.getFilterConfig().getServletContext(), rootLocation, BOWER_MANIFEST_FILENAME); for (String bowerManifest : resourcePaths) { try { URL bowerManifestUrl = this.context.getFilterConfig().getServletContext().getResource(bowerManifest); BowerManifest bowerConf = mapper.readValue(bowerManifestUrl, BowerManifest.class); if (bowerConf.getMain() != null) { LOG.debug("Bower component found: \"{}\"", bowerConf.getName()); BundleStorageUnit bsu = mapToBundle(bowerConf, rootLocation); bsu.setRelativePath(bowerManifestUrl.toString()); BundleUtils.finalize(bsu, this.context); LOG.trace("Parsed bundle \"{}\" ({})", bsu.getName(), bsu); bundles.add(bsu); } else { LOG.debug("No \"main\" parameter was found in the \"{}\" file", bowerManifest); } } catch (IOException e) { LOG.warn("Unable to convert the \"{}\" Bower component to a bundle", e); } } return bundles; }
public List<BundleStorageUnit> getBundlesFromWebapp(String rootLocation) { List<BundleStorageUnit> bundles = new ArrayList<BundleStorageUnit>(); Set<String> resourcePaths = null; resourcePaths = WebResourceScanner.findResourcePaths(this.context.getFilterConfig().getServletContext(), rootLocation, BOWER_MANIFEST_FILENAME); for (String bowerManifest : resourcePaths) { try { URL bowerManifestUrl = this.context.getFilterConfig().getServletContext().getResource(bowerManifest); BowerManifest bowerConf = mapper.readValue(bowerManifestUrl, BowerManifest.class); if (bowerConf.getMain() != null) { LOG.debug("Bower component found: \"{}\"", bowerConf.getName()); BundleStorageUnit bsu = mapToBundle(bowerConf, rootLocation); bsu.setRelativePath(bowerManifestUrl.toString()); BundleUtils.finalize(bsu, this.context); LOG.trace("Parsed bundle \"{}\" ({})", bsu.getName(), bsu); bundles.add(bsu); } else { LOG.debug("No \"main\" parameter was found in the \"{}\" file", bowerManifest); } } catch (IOException e) { LOG.warn("Unable to convert the \"{}\" Bower component to a bundle", e); } } return bundles; }
String bowerFolder = WebResourceScanner.findResourcePath(this.context.getFilterConfig().getServletContext(), "/", BOWER_COMPONENTS_FOLDER); if (StringUtils.isNotBlank(bowerFolder)) {
String bowerFolder = WebResourceScanner.findResourcePath(this.context.getFilterConfig().getServletContext(), "/", BOWER_COMPONENTS_FOLDER); if (StringUtils.isNotBlank(bowerFolder)) {