Example #1
0
 @Test
 public void testModelWriter() throws Exception {
   StringWriter sw = new StringWriter();
   ModelWriter writer = new YamlModelWriter();
   Model model = getModel();
   Properties p = new Properties();
   p.setProperty("FOO", "BAR");
   model.setProperties(p);
   writer.write(sw, null, model);
   // System.out.println(sw.toString());
 }
 private void writeModelToFile(Model model, File target) throws MojoFailureException {
   try {
     modelWriter.write(target, null, model);
   } catch (IOException caught) {
     throw new MojoFailureException("error writing POM to " + target.getName(), caught);
   }
 }