/** * Generate a pom.xml file from a MavenProject description * @return */ private String modelToStringXml(Model model) { DefaultModelWriter modelWriter = new DefaultModelWriter(); StringWriter output = new StringWriter(); String result = ""; try { modelWriter.write(output, null, model); result = output.getBuffer().toString(); } catch (IOException e) { logger.error("Cannot convert model to pom: " + e.getMessage()); throw new TechnicalException("Cannot convert model to pom", e); } return result; }
public ChangeManager ( final Log log ) { this.log = log; this.writer = new DefaultModelWriter (); this.reader = new DefaultModelReader (); }