public void execute() throws BuildException { // if the user didn't supply a conf file, load the default if (_conf == null) _conf = newConfiguration(); if (_conf.getPropertiesResource() == null) { ConfigurationProvider cp = ProductDerivations.loadDefaults ((ClassLoader) AccessController.doPrivileged( J2DoPrivHelper.getClassLoaderAction(_conf.getClass()))); 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; } }
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; } }
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; } }
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; } }