|
@@ -98,10 +98,14 @@ public class ProjectHelper { |
|
|
* Parses the project file. |
|
|
* Parses the project file. |
|
|
*/ |
|
|
*/ |
|
|
private void parse() throws BuildException { |
|
|
private void parse() throws BuildException { |
|
|
|
|
|
FileInputStream inputStream = null; |
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
SAXParser saxParser = getParserFactory().newSAXParser(); |
|
|
SAXParser saxParser = getParserFactory().newSAXParser(); |
|
|
parser = saxParser.getParser(); |
|
|
parser = saxParser.getParser(); |
|
|
saxParser.parse(buildFile, new RootHandler()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inputStream = new FileInputStream(buildFile); |
|
|
|
|
|
saxParser.parse(inputStream, new RootHandler()); |
|
|
} |
|
|
} |
|
|
catch(ParserConfigurationException exc) { |
|
|
catch(ParserConfigurationException exc) { |
|
|
throw new BuildException("Parser has not been configured correctly", exc); |
|
|
throw new BuildException("Parser has not been configured correctly", exc); |
|
@@ -134,6 +138,16 @@ public class ProjectHelper { |
|
|
catch(IOException exc) { |
|
|
catch(IOException exc) { |
|
|
throw new BuildException("Error reading project file", exc); |
|
|
throw new BuildException("Error reading project file", exc); |
|
|
} |
|
|
} |
|
|
|
|
|
finally { |
|
|
|
|
|
if (inputStream != null) { |
|
|
|
|
|
try { |
|
|
|
|
|
inputStream.close(); |
|
|
|
|
|
} |
|
|
|
|
|
catch (IOException ioe) { |
|
|
|
|
|
// ignore this |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|