FileOutputStream fos = null;
try {
fos = new FileOutputStream(getPropertiesFile());
properties.store(fos, "File automatically generated by JNode Packager");
} catch (IOException e) {
throw new BuildException("failed to write properties file", e);
} finally {
if (fos != null) {
try {
fos.close();
} catch (IOException e) {
throw new BuildException("failed to close properties file", e);
}
}
}
}
}