/** * Loads the configuration specified by the given config file. * * @param file The file. */ public void load(File file) throws IOException, SAXException { load(new FileInputStream(file)); }
/** * Loads the configuration specified by the given config file. * * @param file The file. */ public void load(File file) throws IOException, SAXException { load(new FileInputStream(file)); }
/** * Loads the configuration specified by the given stream. * * @param in The stream. */ public void load(InputStream in) throws IOException, SAXException { load(new InputStreamReader(in, "utf-8")); }
/** * Load the config, do filtering as needed. * * @param config The config to load into. * @param configFile The config file. */ protected void loadConfig(EnunciateConfiguration config, File configFile) throws IOException, SAXException, MavenFilteringException { if (this.configFilter == null) { getLog().debug("No maven file filter was provided, so no filtering of the config file will be done."); config.load(configFile); } else { this.scratchDir.mkdirs(); File filteredConfig = File.createTempFile("enunciateConfig", ".xml", this.scratchDir); getLog().debug("Filtering " + configFile + " to " + filteredConfig + "..."); this.configFilter.copyFile(configFile, filteredConfig, true, this.project, new ArrayList(), true, "utf-8", this.session); config.load(filteredConfig); } }
/** * Reads the enunciate configuration from the specified file, if any. * * @return The configuration, or null if none is specified. */ protected EnunciateConfiguration loadConfig() throws IOException { EnunciateConfiguration config = new EnunciateConfiguration(); File configFile = getConfigFile(); if (configFile == null) { info("No config file specified, using defaults...."); } else if (!configFile.exists()) { warn("Config file %s doesn't exist, using defaults....", configFile); } else { try { config.load(configFile); } catch (SAXException e) { throw new IOException("Error parsing enunciate configuration file " + configFile + ": " + e.getMessage()); } } return config; }
/** * Reads the enunciate configuration from the specified file, if any. * * @return The configuration, or null if none is specified. */ protected EnunciateConfiguration loadConfig() throws IOException { EnunciateConfiguration config = new EnunciateConfiguration(); File configFile = getConfigFile(); if (configFile == null) { info("No config file specified, using defaults...."); } else if (!configFile.exists()) { warn("Config file %s doesn't exist, using defaults....", configFile); } else { try { config.load(configFile); } catch (SAXException e) { throw new IOException("Error parsing enunciate configuration file " + configFile + ": " + e.getMessage()); } } return config; }
ExpandProperties reader = new ExpandProperties(new FileReader(this.configFile)); reader.setProject(getProject()); config.load(reader); proxy.setConfigFile(this.configFile);
config.load(this.configFile); proxy.setConfigFile(this.configFile);