/** * Return a {@link ConfigurationProvider} that has parsed system defaults. */ public static ConfigurationProvider loadDefaults(ClassLoader loader) { return load(loader, false); }
if ((AccessController.doPrivileged(J2DoPrivHelper .isFileAction(file))).booleanValue()) provider = ProductDerivations.load(file, anchor, null); else { file = new File("META-INF" + File.separatorChar + path); if ((AccessController.doPrivileged(J2DoPrivHelper .isFileAction(file))).booleanValue()) provider = ProductDerivations.load(file, anchor, null); else provider = ProductDerivations.load(path, anchor, null);
/** * Return a {@link ConfigurationProvider} that has parsed system defaults. */ public static ConfigurationProvider loadDefaults(ClassLoader loader) { return load(loader, false); }
public void execute() throws BuildException { // if the user didn't supply a conf file, load the default if (_conf == null) _conf = newConfiguration(); ConfigurationProvider cp = null; String propertiesResource = _conf.getPropertiesResource(); if ( propertiesResource == null) { cp = ProductDerivations.loadDefaults(getConfigPropertiesResourceLoader()); } else if (_conf.isDeferResourceLoading() && !StringUtils.isEmpty(propertiesResource)) { Map<String, String> result = Configurations.parseConfigResource(propertiesResource); String path = result.get(Configurations.CONFIG_RESOURCE_PATH); String anchor = result.get(Configurations.CONFIG_RESOURCE_ANCHOR); cp = ProductDerivations.load(path, anchor, getConfigPropertiesResourceLoader()); } if (cp != null){ cp.setInto(_conf); } String[] files = getFiles(); try { executeOn(files); } catch (Throwable e) { e.printStackTrace(); if (haltOnError) throw new BuildException(e); } finally { _conf.close(); _conf = null; } }
/** * Return a {@link ConfigurationProvider} that has parsed system globals. */ public static ConfigurationProvider loadGlobals(ClassLoader loader) { return load(loader, true); }
public void execute() throws BuildException { // if the user didn't supply a conf file, load the default if (_conf == null) _conf = newConfiguration(); ConfigurationProvider cp = null; String propertiesResource = _conf.getPropertiesResource(); if ( propertiesResource == null) { cp = ProductDerivations.loadDefaults(getConfigPropertiesResourceLoader()); } else if (_conf.isDeferResourceLoading() && !StringUtil.isEmpty(propertiesResource)) { Map<String, String> result = Configurations.parseConfigResource(propertiesResource); String path = result.get(Configurations.CONFIG_RESOURCE_PATH); String anchor = result.get(Configurations.CONFIG_RESOURCE_ANCHOR); cp = ProductDerivations.load(path, anchor, getConfigPropertiesResourceLoader()); } if (cp != null){ cp.setInto(_conf); } String[] files = getFiles(); try { executeOn(files); } catch (Throwable e) { e.printStackTrace(); if (haltOnError) throw new BuildException(e); } finally { _conf.close(); _conf = null; } }
/** * Return a {@link ConfigurationProvider} that has parsed system defaults. */ public static ConfigurationProvider loadDefaults(ClassLoader loader) { return load(loader, false); }
public void execute() throws BuildException { // if the user didn't supply a conf file, load the default if (_conf == null) _conf = newConfiguration(); ConfigurationProvider cp = null; String propertiesResource = _conf.getPropertiesResource(); if ( propertiesResource == null) { cp = ProductDerivations.loadDefaults(getConfigPropertiesResourceLoader()); } else if (_conf.isDeferResourceLoading() && !StringUtil.isEmpty(propertiesResource)) { Map<String, String> result = Configurations.parseConfigResource(propertiesResource); String path = result.get(Configurations.CONFIG_RESOURCE_PATH); String anchor = result.get(Configurations.CONFIG_RESOURCE_ANCHOR); cp = ProductDerivations.load(path, anchor, getConfigPropertiesResourceLoader()); } if (cp != null){ cp.setInto(_conf); } String[] files = getFiles(); try { executeOn(files); } catch (Throwable e) { e.printStackTrace(); if (haltOnError) throw new BuildException(e); } finally { _conf.close(); _conf = null; } }
/** * Return a {@link ConfigurationProvider} that has parsed system globals. */ public static ConfigurationProvider loadGlobals(ClassLoader loader) { return load(loader, true); }
/** * Return a {@link ConfigurationProvider} that has parsed system defaults. */ public static ConfigurationProvider loadDefaults(ClassLoader loader) { return load(loader, false); }
/** * Return a {@link ConfigurationProvider} that has parsed system globals. */ public static ConfigurationProvider loadGlobals(ClassLoader loader) { return load(loader, true); }
/** * Return a {@link ConfigurationProvider} that has parsed system globals. */ public static ConfigurationProvider loadGlobals(ClassLoader loader) { return load(loader, true); }
/** * This method loads the named resource as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>properties</code> value with the name of a resource. */ public void setProperties(String resourceName) throws IOException { ProductDerivations.load(resourceName, null, getClass().getClassLoader()).setInto(this); _auto = resourceName; }
/** * This method loads the named file as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>propertiesFile</code> value with the name of a file. */ public void setPropertiesFile(File file) throws IOException { ProductDerivations.load(file, null, getClass().getClassLoader()). setInto(this); _auto = file.toString(); }
/** * This method loads the named resource as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>properties</code> value with the name of a resource. */ public void setProperties(String resourceName) throws IOException { if (!_deferResourceLoading) { String anchor = null; if (resourceName.indexOf("#") != -1) { anchor = resourceName.substring(resourceName.lastIndexOf("#") + 1); resourceName = resourceName.substring(0, resourceName.length() - anchor.length() - 1); } ProductDerivations.load(resourceName, anchor, getClass().getClassLoader()).setInto(this); } _auto = resourceName; }
/** * This method loads the named resource as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>properties</code> value with the name of a resource. */ public void setProperties(String resourceName) throws IOException { if (!_deferResourceLoading) { String anchor = null; if (resourceName.indexOf("#") != -1) { anchor = resourceName.substring(resourceName.lastIndexOf("#") + 1); resourceName = resourceName.substring(0, resourceName.length() - anchor.length() - 1); } ProductDerivations.load(resourceName, anchor, getClass().getClassLoader()).setInto(this); } _auto = resourceName; }
/** * This method loads the named resource as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>properties</code> value with the name of a resource. */ public void setProperties(String resourceName) throws IOException { if (!_deferResourceLoading) { String anchor = null; if (resourceName.indexOf("#") != -1) { anchor = resourceName.substring(resourceName.lastIndexOf("#") + 1); resourceName = resourceName.substring(0, resourceName.length() - anchor.length() - 1); } ProductDerivations.load(resourceName, anchor, getClass().getClassLoader()).setInto(this); } _auto = resourceName; }
/** * This method loads the named file as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>propertiesFile</code> value with the name of a file. */ public void setPropertiesFile(File file) throws IOException { ProductDerivations.load(file, null, getClass().getClassLoader()). setInto(this); setDeferResourceLoading(false); _auto = file.toString(); }
/** * This method loads the named file as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>propertiesFile</code> value with the name of a file. */ public void setPropertiesFile(File file) throws IOException { ProductDerivations.load(file, null, getClass().getClassLoader()). setInto(this); setDeferResourceLoading(false); _auto = file.toString(); }
/** * This method loads the named file as a properties file. It is * useful for auto-configuration tools so users can specify a * <code>propertiesFile</code> value with the name of a file. */ public void setPropertiesFile(File file) throws IOException { ProductDerivations.load(file, null, getClass().getClassLoader()). setInto(this); setDeferResourceLoading(false); _auto = file.toString(); }