/** * Changes String for <code>originalUri</code> into {@link LocationPattern} */ public void compile() throws MalformedURLException { originalUriPattern = new LocationPattern(originalUri); } }
other = new LocationPattern(otherUri); } catch (IllegalArgumentException e) { LOG.debug("Can't parse \"" + otherUri + "\" as Maven URI. Ignoring.");
LocationPattern pattern = new LocationPattern(uri); String ga = String.format("%s/%s", pattern.getGroupId(), pattern.getArtifactId()); ga2uri.computeIfAbsent(ga, k -> new LinkedList<>()).add(originalUri);
LocationPattern pattern = new LocationPattern(uri); String ga = String.format("%s/%s", pattern.getGroupId(), pattern.getArtifactId()); ga2uri.computeIfAbsent(ga, k -> new LinkedList<>()).add(originalUri);
} else { try { repositoryBlacklist.add(new LocationPattern(location)); } catch (IllegalArgumentException e) { LOG.warn("Problem parsing repository blacklist URI \"" + location + "\": " + e.getMessage() + ". Ignoring."); } else { try { bundleBlacklist.add(new LocationPattern(location)); } catch (IllegalArgumentException e) { LOG.warn("Problem parsing bundle blacklist URI \"" + location + "\": " + e.getMessage() + ". Ignoring.");
for (String repositoryURI : getBlacklistedRepositories()) { try { blacklistedRepositoryLocationPatterns.add(new LocationPattern(repositoryURI)); blacklisted.add(repositoryURI + ";" + Blacklist.BLACKLIST_TYPE + "=" + Blacklist.TYPE_REPOSITORY); } catch (IllegalArgumentException e) {
blacklist.blacklistRepository(new LocationPattern(br)); } catch (IllegalArgumentException e) { LOGGER.warn("Blacklisted features XML repository URI is invalid: {}, ignoring", br); blacklist.blacklistBundle(new LocationPattern(bb)); } catch (IllegalArgumentException e) { LOGGER.warn("Blacklisted bundle URI is invalid: {}, ignoring", bb);
blacklistedDescriptors.forEach(lp -> { processor.getInstructions().getBlacklistedRepositoryLocationPatterns() .add(new LocationPattern(lp)); }); .add(new LocationPattern("mvn:" + selfGroupId + "/" + selfArtifactId));
blacklistedDescriptors.forEach(lp -> { processor.getInstructions().getBlacklistedRepositoryLocationPatterns() .add(new LocationPattern(lp)); }); .add(new LocationPattern("mvn:" + selfGroupId + "/" + selfArtifactId));
blacklist.blacklistRepository(new LocationPattern(br)); } catch (IllegalArgumentException e) { LOGGER.warn("Blacklisted features XML repository URI is invalid: {}, ignoring", br); blacklist.blacklistBundle(new LocationPattern(bb)); } catch (IllegalArgumentException e) { LOGGER.warn("Blacklisted bundle URI is invalid: {}, ignoring", bb);
private void processBundles(List<Bundle> bundles, boolean allBlacklisted, Boolean forceDependency) { for (Bundle bundle : bundles) { boolean bundleBlacklisted = allBlacklisted || isBundleBlacklisted(bundle.getLocation()); if (bundleBlacklisted) { // blacklisting has higher priority bundle.setBlacklisted(true); } else { // if not blacklisted, it may be overriden staticOverrideBundle(bundle); // and may have dependency flag altered if (forceDependency != null) { // set at feature level bundle.setDependency(forceDependency); } else { // may have dependency overriden at bundle level for (OverrideBundleDependency.OverrideDependency overrideBundleDependency : getInstructions().getOverrideBundleDependency().getBundles()) { LocationPattern pattern = new LocationPattern(overrideBundleDependency.getUri()); if (pattern.matches(bundle.getLocation())) { bundle.setDependency(overrideBundleDependency.isDependency()); } } } } } }