/** * load properties from a file. * @param PhingFile $file * @throws BuildException */ protected function loadFile(PhingFile $file) { $fileParser = $this->fileParserFactory->createParser($file->getFileExtension()); $props = new Properties(null, $fileParser); $this->log("Loading " . $file->getAbsolutePath(), $this->logOutput ? Project::MSG_INFO : Project::MSG_VERBOSE); try { // try to load file if ($file->exists()) { $props->load($file); $this->addProperties($props); } else { $this->log("Unable to find property file: " . $file->getAbsolutePath() . "... skipped", Project::MSG_WARN); } } catch (IOException $ioe) { throw new BuildException("Could not load properties from file.", $ioe); } }