// FIXME this should/can-not use the Maven Native file writer if we are going to abstract file APIs
MavenXpp3Writer writer = new MavenXpp3Writer();
FileWriter fw = new FileWriter(getPOMFile().getUnderlyingResourceObject());
writer.write(fw, pom);
fw.close();
manager.fireEvent(new ResourceModified(getPOMFile()), new Annotation[] {});
}
catch (IOException e)
{
throw new ProjectModelException("Could not write POM file: " + getPOMFile(), e);
}