public Stages(String localConfig, LocalResolver resolver)
			throws StagingException {
		this.resolver = resolver;
		if (resolver.getURLStreamHandlerFactory() != null) {
			try {
				URL.setURLStreamHandlerFactory(resolver
						.getURLStreamHandlerFactory());
			} catch (SecurityException ignored) {
			} catch (Error ignored) {
			}
		}
		this.uriPatterns = loadPatterns();
		this.localConfig = localConfig;
		if (localConfig != null) {
			loadLocalConfig();
		}
		for (URL configURL : this.repositoryConfigURLs) {
			try {
				loadStages(configURL);
			} catch (Exception e) {
				log.error("Error loading remote staging config", e);
			}
		}
	}